repo.or.cz
/
sdlbotor.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Intelligent robot movement.
[sdlbotor.git]
/
main.cpp
blob
d7515e4e260bb206dff1a78feb5537e67202d0ce
1
#include <cstdlib>
2
#include <time.h>
3
#include
"Game.h"
4
5
botor
::
Game game
;
6
7
void
init
()
8
{
9
if
(
SDL_Init
(
SDL_INIT_VIDEO
) <
0
)
10
{
11
printf
(
"Unable to init SDL: %s
\n
"
,
SDL_GetError
() );
12
exit
(
1
);
13
}
14
15
atexit
(
SDL_Quit
);
16
17
18
SDL_WM_SetCaption
(
"botor"
,
"SDLBotor"
);
19
20
srand
(
time
(
0
));
21
}
22
23
24
int
main
(
int
argc
,
char
**
argv
)
25
{
26
27
init
();
28
29
game
.
run
();
30
31
return
0
;
32
}