Commit Graph

25 Commits (eb82ad3173b959d516eab97ff10f7e84e184afb3)

Author SHA1 Message Date
Nakidai Perumenei 71cfceee4b Now game clears cursor at exit on ^C 2023-12-17 03:07:48 +03:00
Nakidai Perumenei 22d3cdeb43 Repair cursor on exit for posix 2023-12-17 00:41:42 +03:00
Nakidai e2d01db144 Refactor
- Fix bug when Make cannot create obj/platform
- Remove some mallocs
2023-12-09 00:35:49 +03:00
Nakidai f70e3d949a Decrease lines count 2023-12-01 23:11:01 +03:00
Nakidai 1685dc927b Remove functions for free screen and player as they're unused 2023-12-01 23:07:02 +03:00
Nakidai 517e57cfc5 I like semicolons 2023-12-01 22:46:43 +03:00
Nakidai eda7badf47 Finally separate platform-specific code from independent 2023-12-01 22:39:38 +03:00
Nakidai 50c7f9d632 Now you can configurate sleep time 2023-11-30 18:05:51 +03:00
Nakidai 4b208ab1c4 Move some functions
- Remove platform.c, instead use inlines
- Some small functions in screen.c are now inline too
- Make functions in sleep.c and input.c not specified in header static
2023-11-30 17:52:46 +03:00
Nakidai 49bd6ee329 Move platform specific code & make sleep platform independent 2023-11-25 13:24:01 +03:00
Nakidai 8e8a1c5abd Add config.h and config.mk to .gitignore 2023-11-25 00:17:55 +03:00
Nakidai 9c54a483bd Remove some warnings 2023-11-25 00:11:34 +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 793db5f00a Fix allocation bug and some other
- Add *.core (core dumps) to .gitignore
- Change defines of directions to enum
2023-11-24 22:14:53 +03:00
Neirokan 29e63d64ee cmake, config, rand, srand 2023-10-31 06:07:03 +03:00
Nakidai f25cd3ca01
Some changes
- Move config.h to include/
- Move config.mk to root
- Remove $RM from configure
2023-10-30 15:50:54 +03:00
Nakidai b611b54575
Switch to threads.h 2023-10-30 02:51:46 +03:00
Nakidai 758dbf9cc2
Some fixes
- Fix UB in playerCreate (it had no return)
- Now Screen has field of Points, not chars
2023-10-30 02:36:03 +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 fac72a00ed
Add player 2023-10-29 23:14:51 +03:00
Nakidai c7797f1f41
Change inputArgs to InputArgs 2023-10-29 22:35:37 +03:00
Nakidai 9dc2da1f90
Add input function 2023-10-29 21:31:33 +03:00
Nakidai 03481db05f
Add files 2023-10-29 20:03:23 +03:00