Commit graph

170 commits

Author SHA1 Message Date
Andy2
d37424ad7f Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/linux/linuxutl.h
2011-11-21 22:18:52 -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
bdb8e6f03c fix several crashers that prevented network games from working when
MAX_COLS was larger than 16.  In order that old-style messages on
relay be readable by new-style code on device, modified server.c's
protocol to include stream version.  But: unless I come up with a
better way of doing this all devices will have to be upgraded at the
same time: old won't be able to read the new format as it's done here.
2011-11-15 06:13:25 -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
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
eehouse@eehouse.org
b8adbd94c1 Merge branch 'android_branch' into send_in_background 2011-10-18 06:47:38 -07:00
Andy2
b02e0eb9cf actually list words: makes a better test. 2011-10-17 06:47:49 -07:00
eehouse@eehouse.org
5afb0ae145 Merge branch 'android_branch' into send_in_background 2011-10-14 22:34:29 -07:00
Andy2
6793742f0f remove option to list all words played in a single lookup dialog, and
supporting code in the jni/common C.
2011-10-14 22:32:30 -07:00
Andy2
0e6b4d749f When pen held on committed tile on board, cons up list of all words
played that include that tile and pass to new util_cellSquareHeld()
method.  In java implementation of that method, use existing lookup
activity code to display list of words.  Enabled on the C side by a
compile-time flag in case it has problems.  Right now the time spent
saving a game before launching the lookup activity, and reloading it
after, is pretty apparent, but that's in emulator which is slow.
2011-10-13 19:14:08 -07:00
Andy2
0dfa69b1b2 implement pen timer with timeout, not idle. 2011-10-11 19:38:26 -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
eehouse@eehouse.org
554e497593 Merge branch 'send_in_background' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into send_in_background 2011-09-30 06:39:23 -07:00
Andy2
c952ebd8e6 cleanup 2011-09-30 06:29:14 -07:00
Eric House
f0c3e2c5f0 Merge branch 'android_branch' into send_in_background 2011-09-22 17:22:01 -07:00
Andy2
35a0a3a291 passing pool into word-listing code a mistake as it put tiles back
when undoing and so the pool grew each time.  Fix, and remove server
API as it's unneeded.
2011-09-22 06:41:48 -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
9eacdb3856 add server_listWordsPlayed, and implement via function in model.c that
uses existing stack and undo features to run a WordNotifierInfo over
some number of scoring passes to gather the words seen.  Seems to work
as tested from gtk version.  Now need to try from android....
2011-09-18 17:20:01 -07:00
Eric House
84931f34ff Merge branch 'android_branch' into send_in_background 2011-09-07 21:44:36 -07:00
Andy2
2d2f3e23fd change signature of util_playerScoreHeld(): pass player num rather
than formatted text. Client code can use new
model_getPlayersLastScore() or whatever else it wants to build text to
show the user.
2011-09-02 18:36:03 -07:00
Andy2
dadf41ad2e add "cancel trade" menu item 2011-09-02 06:38:30 -07:00
Andy2
c2150bc9ed get rid of util_setInTrade() 2011-09-02 06:14:29 -07:00
eehouse@eehouse.org
b6e5327b1a Merge branch 'android_branch' into send_in_background 2011-08-31 06:46:42 -07:00
Eric House
c01981bc8f Make miniwindow stuff compile-time optional. The goal's to use native
features where they look better or are easier to manage, e.g. Toasts
and dialogs on Android.
2011-08-29 20:36:01 -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
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
Eric House
3cc105da0b add ability to dump board (model) as text, protected by ifdef that
will likely only get set on Linux.  Uses lower-case to designate
blanks.  For that and maybe string size assumptions is very broken for
non-ascii languages, including Spanish.
2011-04-13 06:45:22 -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
Andy2
80e0edbf03 cleanup 2011-03-31 06:41:11 -07:00
Andy2
fc4fddb055 check if can hint (to refresh buttons) after enter/leaving trade mode 2011-03-08 07:41:16 -08:00
Andy2
bf0582f0aa make hint buttons en/disabled based on board_canHint() results. 2011-02-01 18:56:37 -08: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
Andy2
825cda9125 new feature for testing proxy: --with-pipe option causes linux client
to, instead of putting up UI, blocking on pipe and once it's readable
opening saved game and passing messages into it from pipe then saving
it when done.  Works, but requires gtk so far.
2011-01-23 21:52:26 -08:00
Andy2
fc8cac3b6a handle new device-gone message by posting timed-out dialog. 2010-11-11 06:43:36 -08:00
Andy2
2d9851902c replace chat menuitem with chat button enabled using comms_canChat() 2010-11-01 06:55:37 -07: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
Andy2
a13bb34419 plug memory leak 2010-10-04 22:14:44 -07:00
Eric House
14fd1f9023 add test code for chat feature: display incoming chat and send via
menu.  Sent message is hard-coded for now; should fix that.
2010-10-03 18:13:48 -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
Andy2
452e3fc86b timeout in milliseconds instead of seconds 2010-09-16 04:46:04 -07:00
Andy2
fa50bd00f1 timeout final scores alert 2010-09-16 03:42:57 -07:00
Andy2
0d7165f881 add ability to run gtk from newrelay.sh. Trying to run 50 instances
crashes the relay as ACKs take too long to come back.
2010-09-16 01:44:54 -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
34a94f23a0 fix error message to not specify host or guest 2010-09-10 01:24:42 -07:00