forked from nakidai/csnake
1
0
Fork 0
Commit Graph

21 Commits (be37715af727090524a94a973283e35d3940e730)

Author SHA1 Message Date
Nakidai 49bd6ee329 Move platform specific code & make sleep platform independent 2023-11-25 13:24:01 +03:00
Nakidai 9c54a483bd Remove some warnings 2023-11-25 00:11:34 +03:00
Nakidai 970fb66db8 Move pthread_t declaration 2023-11-25 00:00:44 +03:00
Nakidai 1ff14f7cbc Add windows support in threads and sleep 2023-11-24 23:58:37 +03:00
Nakidai ce1e91d90f Switch back to pthread.h 2023-11-24 23:32:42 +03:00
Nakidai 0b74ef8618 Add windows support 2023-11-24 22:58:33 +03:00
Nakidai 98089c4351
Add pause key
Also moved render with sleep to start of loop, so you can see first
frame.
2023-11-01 19:29:12 +03:00
Nakidai b64ffdb82a
Fix condition 2023-11-01 19:21:51 +03:00
Nakidai c31de323f0
Fix bug when game freezes on max possible score 2023-11-01 18:34:19 +03:00
Nakidai bcf6465f4e
Optimize game over condition 2023-11-01 13:27:42 +03:00
Neirokan 29e63d64ee cmake, config, rand, srand 2023-10-31 06:07:03 +03:00
Nakidai 8b9fcdd3df
Now player can't turn into itself 2023-10-31 05:05:10 +03:00
Nakidai e9e503d5b2
Change length of line to SIZE*2 2023-10-30 15:52:25 +03:00
Nakidai 317622a253
Add code configuraction in configure 2023-10-30 15:50:53 +03:00
Nakidai d6b4f0be32
Some fixes
- Now every frame is cleared
- Fix collision with self
2023-10-30 15:35:15 +03:00
Nakidai 84e21cb515
Add move to start of screen every tick 2023-10-30 14:24:34 +03:00
Nakidai a064af95da
Add score and *the great line* 2023-10-30 03:53:48 +03:00
Nakidai b611b54575
Switch to threads.h 2023-10-30 02:51:46 +03:00
Nakidai b402dc177c
Add gameplay
- wasd - turn snake
- q - leave
2023-10-30 01:55:20 +03:00
Nakidai abda36c1c3
Some fixes & start to make gameplay
- Fix input function, so now it can be used as thread
- Edit main loop, to quit press q
- Add score incrementing for player
2023-10-30 00:24:13 +03:00
Nakidai 03481db05f
Add files 2023-10-29 20:03:23 +03:00