aboutsummaryrefslogtreecommitdiff
path: root/btsd.c
Commit message (Collapse)AuthorAgeFilesLines
* make cell2coords thread-safe.rodri2023-10-071-4/+7
|
* tell the spectator who's playing the moment they join.rodri2023-10-071-2/+5
|
* use a better random source. fix a bug with andys generating oob cell ↵rodri2023-10-071-1/+0
| | | | coordinates.
* initial implementation of an AI.rodri2023-10-061-40/+126
| | | | | | added different modes for those who want to play with others and those who prefer to play against a bot (-a flag).
* send the matches list upon first connection. changed the syntax a bit.rodri2023-09-291-13/+27
|
* implemented spectator mode.rodri2023-09-271-11/+45
|
* initial work towards spectator mode.rodri2023-09-261-1/+8
|
* add parsecmd to the server.rodri2023-09-211-21/+50
| | | | | | | modified it to allow for commands with the same name but different nargs. now each match list entry is preceded by an 'm', to simplify its processing. note that this breaks the client. the next commit will fix that.
* more work on the menulist of matches.rodri2023-09-201-8/+4
|
* initial work on a menu of matches.rodri2023-09-171-2/+2
| | | | | also made some corrections and changed the tokenize(2) fields identifiers from cmd[] to f[].
* renamed cmd to f(ields) to better reflect their nature.rodri2023-09-161-29/+29
|
* remove leftover msgq channel.rodri2023-09-161-2/+0
|
* got rid of unnecessary operator process.rodri2023-09-151-60/+52
|
* fit client to the new architecture. clean things up, make them more consistent.rodri2023-09-151-0/+2
|
* new server architecture.rodri2023-09-151-160/+502
|
* fixed game-breaking typo.rodri2023-09-101-1/+1
|
* made playerq a Channel, turned polling into send/recv points and got rid of ↵rodri2023-09-091-81/+37
| | | | the reaper.
* got rid of unused locking popplayer. use an fd for the threadgrp.rodri2023-09-081-21/+4
|
* inline spawned threads to threadmain.Amavect2023-09-071-6/+4
| | | | | | | | Pointers to automatic variables become invalid when threadmain exits. Solution is to reuse threadmain. Use nbsend to avoid deadlock to the draw channel. Input struct is no longer needed, inline it.
* obtain each player's username and show it during battle.rodri2023-09-011-7/+13
|
* make playerq a fifo instead of a lifo.rodri2023-09-011-4/+10
|
* improved playerq locking.rodri2023-08-311-14/+27
| | | | wrote a little how to play guide.
* forbid placing ships after being done with the layout.rodri2023-08-301-0/+4
| | | | | show the current ship and its length during placement. also made changes to some of the info banners.
* implemented match conclusion logic and notification.rodri2023-08-291-1/+9
| | | | made the window un-resizable.
* reset the boards after each game.rodri2023-08-291-7/+17
| | | | | | only change turns if the shot was valid. show the opponent's hits on localboard. keep the orientation for consecutive ships while outlaying.
* removed unnecessary pointer.rodri2023-08-291-6/+4
|
* major development stride:rodri2023-08-291-33/+94
| | | | | | - implemented per-line msg framing - wrote most of the game logic - fixed an issue where the ship would go off-board when rotated
* implemented most of the layout code.rodri2023-08-251-1/+1
| | | | | | added a new util.c to host the cell/coordinate conversions. made the showproc a painter thread instead, to avoid problems with menuhit(2).
* fixed the match process cleanup procedure.rodri2023-08-241-76/+62
|
* added the rules manual.rodri2023-08-161-32/+61
|
* latest try of player mgmt procedure. (not working)rodri2023-08-121-29/+178
|
* initial commit.rodri2023-08-081-0/+98