No description
  • C 98.9%
  • Makefile 1.1%
Find a file
2019-02-10 13:59:02 +01:00
.obj vojtech project 2018-04-05 21:54:07 +02:00
.gitignore ignore 2019-01-14 18:46:21 +01:00
config.h Turn off debugging by default 2019-01-14 18:54:56 +01:00
debug.c A very nice macro 2019-01-14 18:54:27 +01:00
debug.h Automatic newline 2019-02-10 10:12:51 +01:00
enum.h started working on better heatmap 2019-01-14 18:47:00 +01:00
example.gif Readme with a nice example 2019-02-10 13:59:02 +01:00
grid.c more centralizing stuff 2019-01-14 18:46:19 +01:00
grid.h more centralizing stuff 2019-01-14 18:46:19 +01:00
heatmap.c force shoot in case of deadlock 2019-01-14 18:47:07 +01:00
heatmap.h heatmap does not make a difference yet 2019-01-14 18:46:36 +01:00
input.c different colors 2019-01-14 18:46:59 +01:00
input.h controls work 2019-01-14 18:46:55 +01:00
main.c use patterns for AI 2019-01-14 18:47:03 +01:00
main.h different colors 2019-01-14 18:46:59 +01:00
Makefile added SDL visualization 2019-01-14 18:46:50 +01:00
player.c avoid placing ships too close to each other 2019-01-14 18:47:04 +01:00
player.h init heatmap 2019-01-14 18:46:33 +01:00
random.c dedicated function to obtain a random number 2019-01-14 18:46:18 +01:00
random.h Bob Ross Move: queue method leads to nowhere, starting over again with heatmap 2019-01-14 18:46:31 +01:00
README.md Readme with a nice example 2019-02-10 13:59:02 +01:00
screen.c A little bit nicer colors 2019-02-10 10:14:05 +01:00
screen.h force shoot in case of deadlock 2019-01-14 18:47:07 +01:00
ship.c avoid placing ships too close to each other 2019-01-14 18:47:04 +01:00
ship.h avoid placing ships too close to each other 2019-01-14 18:47:04 +01:00
shoot.c Feature: Mark the ship as sunk in the player map, too 2019-02-10 10:13:40 +01:00
shoot.h track isolated fields, but now it seems that we have a deadlock 2019-01-14 18:47:05 +01:00
struct.h use patterns for AI 2019-01-14 18:47:03 +01:00

A poor man's battleship opponent

Instead of having pure random strikes on remaining fields we want to have a bit more cleverness when we suddenly hit a target.

By using the following macro definitinos we can have player vs. CPU or CPU vs. CPU and control the diffictuly (6 is easy, 9 is difficult) during compile time:

#define PLAYER1CPU false
#define PLAYER2CPU true

#define PLAYER1_DIFFICULTY 6
#define PLAYER2_DIFFICULTY 9

Example

Example

License

Educational purpose only.