Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
prog-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pedro Folloni Pesserl
prog-1
Commits
ec8a35b6
Commit
ec8a35b6
authored
2 years ago
by
Pedro Folloni Pesserl
Browse files
Options
Downloads
Patches
Plain Diff
comment out unnecessary function
parent
5a412e90
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
t1/mundo.c
+10
-16
10 additions, 16 deletions
t1/mundo.c
with
10 additions
and
16 deletions
t1/mundo.c
+
10
−
16
View file @
ec8a35b6
...
...
@@ -95,18 +95,18 @@ local_t inicializa_local(int id, int tamanho_mundo) {
return
l
;
}
evento_t
*
cria_evento
(
int
tempo
,
int
tipo
,
int
dado1
,
int
dado2
)
{
evento_t
*
e
;
if
(
!
(
e
=
malloc
(
sizeof
(
evento_t
)))
)
MEM_ERROR_EXIT
;
/*
evento_t *cria_evento(int tempo, int tipo, int dado1, int dado2) {
*/
/*
evento_t *e;
*/
/*
if ( !(e = malloc(sizeof(evento_t))) )
*/
/*
MEM_ERROR_EXIT;
*/
e
->
tempo
=
tempo
;
e
->
tipo
=
tipo
;
e
->
dado1
=
dado1
;
e
->
dado2
=
dado2
;
/*
e->tempo = tempo;
*/
/*
e->tipo = tipo;
*/
/*
e->dado1 = dado1;
*/
/*
e->dado2 = dado2;
*/
return
e
;
}
/*
return e;
*/
/* } */
mundo_t
*
cria_mundo
(
lef_t
*
lista_de_eventos
)
{
mundo_t
*
m
;
...
...
@@ -143,8 +143,6 @@ mundo_t *cria_mundo(lef_t *lista_de_eventos) {
/* para cada herói, cria evento de chegada e insere na lef */
/* evento_t *evento_chegada_heroi; */
for
(
i
=
0
;
i
<
m
->
n_herois
;
i
++
)
{
/* evento_chegada_heroi = cria_evento(aleat(0, 96*7), CHEGADA, m->herois[i].id, aleat(0, n_locais-1)); */
/* TODO: testar se funciona alocar o evento estaticamente desse jeito */
evento_t
evento_chegada_heroi
=
{
aleat
(
0
,
96
*
7
),
CHEGADA
,
...
...
@@ -157,8 +155,6 @@ mundo_t *cria_mundo(lef_t *lista_de_eventos) {
/* para cada missao, cria evento e insere na lef */
for
(
i
=
0
;
i
<
m
->
n_missoes
;
i
++
)
{
/* evento_chegada_heroi = cria_evento(aleat(0, 96*7), CHEGADA, m->herois[i].id, aleat(0, n_locais-1)); */
/* TODO: testar se funciona alocar o evento estaticamente desse jeito */
evento_t
evento_missao
=
{
aleat
(
0
,
m
->
fim_do_mundo
),
MISSAO
,
...
...
@@ -168,10 +164,8 @@ mundo_t *cria_mundo(lef_t *lista_de_eventos) {
if
(
!
(
adiciona_ordem_lef
(
lista_de_eventos
,
&
evento_missao
))
)
MEM_ERROR_EXIT
;
}
/* cria evento de fim e insere na lef */
/* TODO: testar se funciona alocar o evento estaticamente desse jeito */
evento_t
fim
=
{
m
->
fim_do_mundo
,
FIM
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment