Commit graph

117 commits

Author SHA1 Message Date
Eric House
79a897b428 fix assert (but still leaking) 2012-02-09 05:16:32 -08:00
Andy2
2a34cd1e05 remove second param from server_do() -- it doesn't work anyway. 2011-12-21 18:45:05 -08:00
Andy2
d37424ad7f Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/linux/linuxutl.h
2011-11-21 22:18:52 -08:00
Eric House
8a51d5f3e4 fix race condition that was breaking tests: when one device sends two
messages they must be handled by the relay in order.  So modify linux
client to build a single packet of all messages sent instead of
letting rq sent each on a separate socket.  The relay would give the
sockets to different threads and sometimes the wrong one won.  Will
need to make sure the android code's doing the same thing (it appears
to be), or perhaps make the coalescing code common so I only debug it
once.
2011-11-17 19:56:36 -08:00
Andy2
210c59ef9b move bonus square values into model: add API to set an array, and API
to query model for values.  Now everybody else queries new model API
rather than client via util_getSquareBonus(), model uses its internal
values if present otherwise falls back to util_getSquareBonus(), and
internalizes the array as part of the game.  Now it should be easier
to have different bonus patterns and to have them exchanged as part of
network game init.
2011-11-16 19:01:11 -08:00
Andy2
379e5f1d96 use actual rather than max possible board dimensions to apportion
space, fixing crashes when max upped to 32.  Will still fail as actual
size approaches that number.
2011-11-14 20:18:09 -08:00
Andy2
2492e7cfc5 Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/linux/cursesmain.c
2011-11-13 17:10:46 -08:00
Andy2
d479b2b979 use timeout rather than idle. Sometimes (due to bug?) curses app is
too busy ever to fire idle proc.
2011-11-10 06:51:05 -08:00
Andy2
8d228ae190 turn on face-up tile picking for Android (though there's no prefs UI
to enable it for a game yet).  In common code, break pick tile utils
method in two, one for blank and the other for tray tiles.  In java,
implement dialog for picking the tiles.  Works, though is a bit clumsy
to have the dialog come and go after every pick.  Better would be a
dialog that stays up and accumulates picks -- but it'd have to know to
reduce the set of tile choices as letters are chosen.  This'll do for
now.
2011-10-28 22:15:56 -07:00
Andy2
4eee7f8aa7 Pass selected tiles into new util function, and from there into java
world, so confirming query can include them.
2011-10-19 18:34:26 -07:00
Andy2
f41d3c27e6 Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/common/server.c
2011-10-19 06:23:16 -07:00
Andy2
b31e829414 Remove file-format differences between debug and non-debug versions.
Fix curses to compile non-debug.
2011-10-18 18:52:37 -07:00
eehouse@eehouse.org
471a9d988d Merge branch 'android_branch' into send_in_background 2011-10-05 07:10:52 -07:00
Andy2
dc20b04a4c remove unused param (on the C/jni side) 2011-10-04 18:54:53 -07:00
eehouse@eehouse.org
82615f409b Merge branch 'android_branch' into send_in_background 2011-10-04 06:49:19 -07:00
Andy2
77b9fa11a5 improving lookup words experience: replace
util_userQuery(QUERY_ROBOT_MOVE) with new util_informMove(), into
which the number of words formed and the words themselves are passed.
The process of consing up the score explanation was already passing
over the model, so storing the words is very little effort, and will
save a call back into the model where the user actually wants to do
the lookup.
2011-10-02 16:21:09 -07:00
Andy2
22382b3a19 reduce logging some more 2011-09-30 18:11:08 -07:00
Andy2
c992c65015 changes to support automated testing of background messages sends: new
param gives name of Unix domain socket to be used to accept connection
that passes in messages from relay and receives messages to be sent
back.  Works once but needs debugging....
2011-09-30 06:32:21 -07:00
Andy2
8e0e8d911e fix compile errors 2011-09-26 18:12:16 -07:00
Andy2
92614370ce Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/common/comms.c
2011-09-20 06:21:54 -07:00
Andy2
7e0252713c changes to use glib main loop were incomplete, didn't include timers.
Fix that.  Now discon_ok2.sh test works with the USE_GLIBLOOP turned
on.
2011-09-19 18:28:19 -07:00
Andy2
c2e2bdf3c5 listen on stdin always -- not sure how the condition got added -- and
don't register for OUTbound events when listening -- stdin gets one
and I don't want to sign up to handle it.
2011-09-19 17:56:20 -07:00
eehouse@eehouse.org
b6e5327b1a Merge branch 'android_branch' into send_in_background 2011-08-31 06:46:42 -07:00
Eric House
3b719f54de add compile-time option to use glib main loop (instead of select())
with ncurses.  The goals to make it easier to include watch on pipes
for incoming messages to better model Android -- and to be a bit more
modern.  Works for one run of test script but needs more testing to be
turned on.
2011-08-29 20:24:15 -07:00
Andy2
dfab747504 make server_do() take a new param to allow caller to call it until
there's nothing more to do (without the assumption it's driven from an
event queue.)
2011-08-16 19:28:59 -07:00
Eric House
cbfdf992bd add compile-time option to allow passing game seed from commandline.
This should allow testing relay changes to deal better with duplicate
seeds.
2011-07-31 22:23:46 -07:00
Andy2
e122953fd5 clean up logging 2011-06-27 18:27:07 -07:00
Andy2
4c5c435fb5 add new parameter so client always gets notified on connection
including how many players are still missing.
2011-05-19 05:51:00 -07:00
Andy2
3b7b4802a9 add ability to specify, track and use separate dictionaries for each
player.  Works for gtk client.  Compiles for Android but there's no UI
yet to specify more than one dict.  Management of dupicate dicts
without duplicating memory -- refcounting -- will be up to the
platforms.
2011-04-01 19:57:10 -07:00
Eric House
4bf613a006 move pipe handling code to where can be shared by curses and gtk -- but use from curses is untested. 2011-01-24 22:20:47 -08:00
Eric House
7a2d279308 add logging so script can better track what state relay game is in 2010-11-18 22:27:06 -08:00
Andy2
ab708e4db1 add devOrder (= hostID) to params passed on connect. Make linux apps compile after API change. 2010-10-29 06:32:18 -07:00
Andy2
7e0bcee6d2 add room name to callback used when device connects: fix linux to compile 2010-10-28 18:46:07 -07:00
Eric House
f0b05da131 reduce logging 2010-10-05 20:57:07 -07:00
Eric House
a6f5ea5f4a sync after saving. Seems to improve recovery from TERMs sent by test scripts. 2010-09-28 18:06:05 -07:00
Eric House
c671f2ab05 plug memory leak 2010-09-20 22:07:10 -07:00
Andy2
00cdbc97d3 Install a no-op TERM handler at first then replace later with one that
just exits main loop.  Do cleanup/file saving on exit from mainloop.
Fixes occasional crash where TERM came in before we were setup to
cleanup.
2010-09-20 04:55:35 -07:00
Eric House
9fc39a55ed add params to set public-room-related booleans; add timeout option on
modal dialogs so gtk version can run unattended.
2010-09-14 21:13:45 -07:00
Andy2
6b9b97231a fix to compile with KEYBOARD_NAV undefined 2010-07-09 06:49:32 -07:00
Andy2
4425ff838c add buttons (gtk) to test new prev-move feature; modify to fit new api
(curses).
2010-07-07 05:29:04 -07:00
Eric House
afb3f4040a fix to compile in non-debug mode 2010-06-17 20:35:54 -07:00
Eric House
08ad0bdfa5 fix assertion failure by passing max size not < actual size 2010-06-05 08:10:02 -07:00
eehouse
e1d956ac09 catch up with board_setPos API change. 2010-06-03 04:58:02 +00:00
eehouse
d263b47a56 lots of changes, still rough, to allow zooming in and out on board.
Includes ability to scroll horizontally by dragging.  Board init API
changes to specify board width and max height instead of cell
dimensions, so now board owns task of picking cell size.  If the
number of cells does not evenly divide into a board dimension then the
extra pixels are distributed among some columns/rows in a way that
still allows bitblit-based scroll implementations (though horizontal
scrolling at this point always does an invalAll()).  Not yet tested
with overlapping tray.  And still need to allow rows to be taller than
cols are wide if platform code has given the space.  Stream format
changes with this checkin.
2010-04-08 04:14:14 +00:00
eehouse
603462fc33 add option to skip modal dialog showing final game score (may prevent
curses version from becoming nonresponsive when used from playme.sh);
add menu command to curses version to resend messages.
2010-03-28 16:08:54 +00:00
eehouse
0b7eee672a do something for -S on curses version too 2010-03-21 03:10:36 +00:00
eehouse
6893fe742a fix r3013 breakage: remove gameID params 2010-02-01 01:50:38 +00:00
ehouse
82382a7cfa Pass results back via timers and call board_draw() when so indicates.
Needed to test dragDropSetAdd.  Candidate for merge to trunk.
2010-01-25 00:28:30 +00:00
ehouse
28265749f9 fix unused var warning in release build 2009-12-17 13:09:10 +00:00
ehouse
35f068e05c Implement new callback giving progress connecting with relay. 2009-12-14 04:06:26 +00:00