Commit Graph

30 Commits (main)

Author SHA1 Message Date
Øystein Ingmar Skartsæterhagen ef5c5fbb35 simple implementations of a few more commands for clients 2008-10-11 22:55:55 +00:00
Øystein Ingmar Skartsæterhagen eed9669db9 more than two clients at the same time 2008-10-11 15:30:33 +00:00
Steinar Hamre 9a73ba8e77 added IPv6 support. 2008-10-11 02:23:32 +00:00
Steinar Hamre 6c9d05433f Clean up some more. 2008-10-11 00:40:56 +00:00
Steinar Hamre 6262b0e853 Use SO_REUSEADDR to solve "socket in use" problem.
remove some more dead code.
2008-10-11 00:39:47 +00:00
Steinar Hamre eed6a20455 New header 2008-10-11 00:03:42 +00:00
Steinar Hamre ffa0ef6154 Removed dead code (and a few fixes) 2008-10-11 00:00:40 +00:00
Steinar Hamre 160e63e91c Fix network support
Multiple clients can now connect.
(For now two first clients will play)
2008-10-10 23:47:41 +00:00
Øystein Ingmar Skartsæterhagen b00565ea66 introduced a move struct, added some functions using it in game.c, written a function terminal_game in server.c for local games 2008-10-10 21:58:24 +00:00
Øystein Ingmar Skartsæterhagen 716cfbc50e color-restricted squares 2008-10-10 12:09:18 +00:00
Øystein Ingmar Skartsæterhagen c0395e561c tell which color a killed piece had, some fixes in asciiart, added markings on the color-restricted squares 2008-10-10 09:47:55 +00:00
Jens ]dne Rydland d860d50001 Det er bedre å bruke pieceinfo til navn på brikkene. 2008-10-09 22:53:09 +00:00
Jens ]dne Rydland fc4418e158 Lagt til så det står hvilken brikke man traff hvis man traff en brikke. 2008-10-09 22:41:29 +00:00
Steinar Hamre 86e2bb041b Buffered 'getc' from network. 2008-10-09 22:38:45 +00:00
Steinar Hamre 2926da45ac makedepend and make clean 2008-10-09 22:13:09 +00:00
Øystein Ingmar Skartsæterhagen 02eb1c6cde splitted out parts of server.c to game.c and asciiart.c, rewritten the asciiart part a bit. things still seem to work 2008-10-09 22:03:38 +00:00
Steinar Hamre c606818adc Network code updated. (simplest solution possible)
It works!
2008-10-09 21:10:35 +00:00
Steinar Hamre ea727f335a Forgot headerfile for network part. 2008-10-09 19:22:50 +00:00
Steinar Hamre 227e1e9254 Almost working network support. 2008-10-09 19:20:37 +00:00
Øystein Ingmar Skartsæterhagen 7d42846db7 trying a different ASCII representation 2008-10-09 14:39:03 +00:00
Øystein Ingmar Skartsæterhagen 00ab866250 added large amounts of ugly code
it should now be possible to play a game by entering both players'
moves at the terminal (compile and run server.c).

moves are entered as follows:

M E9 S   # move piece at E9 south
M D5 NW  # move piece at D5 north-west
R D5 R   # rotate piece at D5 clockwise ('right')
R D5 L   # rotate piece at D5 counterclockwise ('left')

the ASCII display should be quite self-explanatory -- or at least, by
applying lots of creativity, _possible_ to read.
2008-10-09 14:21:19 +00:00
Øystein Ingmar Skartsæterhagen 4e1e418117 code for printing board and placing pieces, simple test in main() 2008-10-08 21:02:52 +00:00
Øystein Ingmar Skartsæterhagen f4fa43c695 reindentert til 4 mellomrom 2008-10-08 17:25:20 +00:00
Øystein Ingmar Skartsæterhagen 9ab50fbd9b noen protokollideer 2008-10-08 17:21:12 +00:00
Øystein Ingmar Skartsæterhagen 9e0757bd3f forslag til ASCII-representasjon av brett 2008-10-08 17:16:56 +00:00
Steinar Hamre ebe5586abd -More compiletime warning
-Some typo fixes
2008-10-03 19:56:51 +00:00
Steinar Hamre 788724b4ff Beginnings of network support.
TODO: rewrite to be addressfamily-independent.  (getaddrinfo)
2008-10-03 16:54:59 +00:00
Steinar Hamre 08dc193e53 clearer this way? 2008-10-02 23:54:22 +00:00
Steinar Hamre bf852e861c Beginnings of the server 2008-10-02 23:51:51 +00:00
Jens ]dne Rydland b4300c1a7d First commit 2008-10-02 20:38:09 +00:00