Commit graph

38 commits

Author SHA1 Message Date
Andy2
ac6dc400ce add board_canHint 2010-07-07 18:47:02 -07:00
Andy2
992f45e1bf new feature: previous move. Modify engine to traverse the set of all
possible moves in either order both within a cached subset and when
building cached subsets.  Still a bit buggy (shows the same move twice
when moving backwards and reaches the top-scoring move) and not well
tested.
2010-07-07 05:27:57 -07:00
Andy2
5f92491ca3 add and implement board_canTogglePending 2010-07-03 11:38:37 -07:00
Andy2
f77cf0e23d add board_redoReplacedTiles and model_redoPendingTiles. The latter
works as long as no blanks are involved.  And new state isn't being
saved so will be lost unless format changed.
2010-07-02 18:52:55 -07:00
Andy2
491cfe7616 add board_canShuffle and implement 2010-07-01 18:55:49 -07:00
Andy2
43c34aa466 add board_canFlip and model_canFlip -- which seem to work though
there's no test that when a single tile is on the board it's not in
the middle.  Sue me.
2010-06-30 20:25:34 -07:00
eehouse
f514717428 Change board_zoom to indicate direction only of zoom, not number of
cols.  When figuring internal dimensions zoom out as needed to meet
maxSize value.  This fixes problem where rotating a zoomed portrait
board to landscape leaves cells bigger than they can be made by
zooming, but then the desired zoom has been changed and stored and so
on return to portrait cells are smaller/less zoomed.  Need to see if I
can live with that.
2010-06-05 03:40:23 +00:00
eehouse
a80d874e9d change api for board_zoom and change callers. No effect on java and
no behavior change.
2010-06-05 03:39:06 +00:00
eehouse
4f16eee1b6 pass maxCellSize into board_setPos, and use it as limit in calculating
whether any further zooming is possible.
2010-06-02 04:58:32 +00:00
eehouse
da2cfa5934 changes (commited earlier but now somehow missing) putting
scroll-related fields into a struct so vertical and horizontal can be
handled by the same code; add to board_zoom out params indicating
whether further zooming is possible.
2010-04-15 02:15:50 +00:00
eehouse
774d3f8a13 copyright change 2010-04-08 04:14:34 +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
ehouse
4425eaa99e move showColors into CommonPrefs, removing separate storage in linux
and wince and removing setter from board and jni APIs.  Palm change
pending.
2010-01-26 04:14:18 +00:00
ehouse
d4bc42b0a1 add getters 2008-11-10 16:01:46 +00:00
ehouse
bbe8cceb6e debug changes: change defines to remove gremlin-only code; add missing constants. 2008-10-11 16:46:08 +00:00
ehouse
f749fdd560 Remove all tabs. No code changes. 2008-05-31 03:26:16 +00:00
ehouse
1e7bc3839b Implement scrolling during drag via timer rather than by counting on
getting notified when pen is dragged off the board.  The latter won't
happen if the board is up against the edge of the screen.
2008-03-29 20:23:27 +00:00
ehouse
c01615e86b reintroduce board_handleKey 2007-01-18 02:42:37 +00:00
ehouse
e0010901f1 add board_handleKeyRepeat, and call it from palm and gtk. This lets a
held nav key walk the cursor across the board.
2007-01-07 04:32:29 +00:00
ehouse
593980817f Clean up for non-keyboard and non-keyboard-nav cases. Wince is the
latter: make it compile again.
2007-01-07 01:01:20 +00:00
ehouse
0303e56c43 Break key handling into keyUp and keyDown, and treat keyDown the same
as penDown.  Idea is to be able to set timers to get bonus square
hints etc. without stylus.  Works, but transitions are rough because
keyDown doesn't know whether keyUp will result in a focus change.
2007-01-06 17:32:08 +00:00
ehouse
7fe5718cc5 When "dived" focus reaches and crosses border of object, return as if
not handled.  This causes the platform to handle the key event itself,
typically by moving the focus to the next top-level object.
2006-11-17 13:41:13 +00:00
ehouse
abca6a4092 Two big changes. Pass focus bit into all or and players when focus
not dived and tray or scoreboard focussed.  This lets platform decide
to display top-level focus via mods to all elements.  Second, when
moving focus to top level from dived, claim not to have handled the
key event (but return true if needs redraw).  This allows platform to
handle shifting focus without requiring callback (which removed.)
2006-11-14 06:46:04 +00:00
ehouse
b171900dfb When moving focus through tray, skip empty space; when through board,
skip cells with tiles permanently played.  Space char raises focus but does
not move it laterally.
2006-11-09 06:05:40 +00:00
ehouse
3153e2b867 Lots of progress on one-handed navigation: add gadgets to stand in for board
scoreboard and tray on palm; make center drill into the focussed object and
spacebar come back up then move the focus among them.  Integrate with other
focussable objects on main form.  Go from separate drawCursor routines to
same for all three, with cursor only visible when focus is drilled down.
On curses, add a hilite rect routine that can be called after text is laid
down, and use for cursors.
2006-11-03 06:23:54 +00:00
ehouse
354cde389e remove unused parameter 2006-06-26 04:39:48 +00:00
ehouse
28411a4466 API change: board is responsible for figuring tile size and giving
extra pixels to divider.
2006-05-06 14:42:38 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
bc3515272c Get rid of unused param 2005-07-14 02:54:47 +00:00
ehouse
dfccb19667 convert util_setTimer to take procptr; remove timer call on board; add
heartbeat to comms that uses util_setTimer with new timer type.
2005-06-23 04:16:53 +00:00
ehouse
67be3191c8 revert change to board_invalRect 2005-01-23 08:17:37 +00:00
ehouse
ee3d6381dd board_invalRect params change 2005-01-23 06:14:07 +00:00
ehouse
90d700356d remove dead param 2005-01-23 05:55:58 +00:00
ehouse
c5e534680f formatting 2005-01-04 04:05:02 +00:00
ehouse
47b4de73e7 add board_formatRemainingTiles 2004-11-06 02:54:25 +00:00
ehouse
f900988bcc pass to engine boolean telling it whether to ask for tray hint limits;
address, for penDown only, confusion between whether pen events are
handled and whether the handling means a redraw is required.  Might
need to do same for penMoved and penUp.
2004-06-25 06:47:35 +00:00
ehouse
1072bf2499 add option to limit number of tiles used by robot 2003-11-30 09:34:40 +00:00
ehouse
5776da0b93 first checkin 2003-11-01 05:35:29 +00:00