Commit Graph

409 Commits

Author SHA1 Message Date
mdb c0ca26e578 Have to set the application context in velocityWillInit() (which I added)
so that it's around before Velocity.init() gets called, which happens in
super.init().


git-svn-id: https://samskivert.googlecode.com/svn/trunk@416 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-02 02:30:54 +00:00
mdb 346c8c8797 Be more robust and log a warning if we're used without first properly
setting the servlet context into the application context.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@415 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-02 02:30:24 +00:00
mdb f09ce0d0fc Modified dispatcher servlet to stick servlet context into Velocity's
application context and implemented a servlet context resource loader
which loads resources via ServletContext.getResourceAsStream().


git-svn-id: https://samskivert.googlecode.com/svn/trunk@414 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-02 02:03:23 +00:00
mdb f06fb0b18a Fixed classpath so that things in classes are preferred, things in
lib/*.jar are next and things in /usr/share/java/*.jar are last.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@413 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-02 02:02:27 +00:00
mdb 6e7375aedc Fixed spelling error: createSiteIdentifier(), not createSiteIdentifer().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@412 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-02 00:58:22 +00:00
mdb 86fe064444 Sort the domain mappings once we've loaded them; fixed a SQL bug; wrote
toString() for the mapping object.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@411 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-02 00:57:47 +00:00
mdb 44d534a2c0 Created a site identifier that reads data from a JDBC table.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@410 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 21:34:19 +00:00
mdb 73c6d2ee86 Changed preInit() to postInit() in Application so that calls to things
like createSiteIdentifier() can happen after the application is
initialized and has access to things like connection providers.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@409 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 21:34:03 +00:00
mdb f1d62ace67 Made Operation public because otherwise I can't do something like this:
public FooRepository
    extends SimpleRepository implements SimpleRepository.Operation
{
}

which seems wacky to me but I can see how we may not have entered the
protected namespace of the extended class while we're processing our
interface implementation declarations. Seems a bit like a bug though.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@408 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 02:08:17 +00:00
mdb f099bd4e03 Formatting.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@407 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 01:49:12 +00:00
mdb 0a6e39fb78 Created a runtime exception that can be thrown if for some reason a
service can't make its services available (like the database is down, or
their team lost, or their girlfriend turned out to be a guy).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@406 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 01:15:18 +00:00
mdb 7e839ce429 Applications now create a site identifier at init time which can be used
to identify sites in the course of operating the application.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@405 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 01:02:20 +00:00
mdb cf9dc555ca Added action() and submit() which make doing standard things like a hidden
form field named "action" and a submit button named "submit" more
convenient.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@404 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 00:35:05 +00:00
mdb b58441fa4e Added support for checkbox form elements.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@403 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 00:28:30 +00:00
mdb 445f4c115c Extracted common code, added support for password input fields.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@402 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 00:22:48 +00:00
mdb e3b925aff0 The big name-change ola: userid -> userId, etc. Added siteId to user
record (and table).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@401 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-11-01 00:07:19 +00:00
mdb 101dbe608f Created a site identifier interface which is used to determine through
which site a particular request originated.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@400 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-31 23:38:37 +00:00
mdb 879f0a5aaa Created a form tool for generating form fields that automatically inherit
the values from the request parameters. Modified dispatcher servlet to put
one in the context for every request.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@399 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-31 11:07:55 +00:00
mdb 39680c9e25 Needed a FriendlyException import.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@398 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-31 09:45:23 +00:00
mdb 57953b968a Converted my web application framework to work with Velocity and cleaned
up some other stuff (removed multiple application support because it was
pointless). Moved some general purpose things into servlet.util (still
need to modify the WebMacro version of the framework to use the general
purpose versions).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@397 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-31 09:44:22 +00:00
mdb d098fee4ff Notes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@396 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-31 09:42:55 +00:00
mdb 69ad1692fe Notes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@395 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-29 04:15:54 +00:00
mdb b9b3962420 Better error reporting.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@394 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-25 01:25:06 +00:00
mdb 743f4e4460 We need a TableLobby now rather than a plain Lobby.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@393 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-24 03:25:11 +00:00
mdb 71f43d5e37 Implement TableConfig.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@392 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-24 03:24:53 +00:00
mdb d2e1c00a5f Documentation fix.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@391 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-24 03:24:36 +00:00
mdb 28ad54b543 Added a "Back to lobby" button.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@390 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-24 03:24:20 +00:00
mdb a3bd6d36ae Use the system messages now that we have 'em.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@389 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 23:57:02 +00:00
mdb 29af0f5a94 Try always repainting after computing our dimensions because revalidate()
doesn't seem to always result in a repaint.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@388 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 23:11:24 +00:00
mdb 8f4e14d756 Don't score cities with zero farmers next to them.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@387 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 23:11:03 +00:00
mdb 330465ad43 Modify the geometry of TWO_CITY_TWO temporarily to make it visually
clearer that it is two separate cities.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@386 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 21:52:01 +00:00
mdb 5ef32ff9e2 Added a version of hexlate() that only prints out the first N bytes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@385 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 21:50:18 +00:00
mdb 36bcc59ca2 Report to the users (using the chat services) when we update the score and
automatically end a users turn if they place a tile with no claimable
features.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@384 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:57:21 +00:00
mdb a9926c56aa Added hasUnclaimedFeature() and modified setPiecen() to do the right thing
if a piecen is placed on a feature that is already claimed (which happens
when someone shows up halfway through a game and we reconstruct the board
state).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@383 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:56:45 +00:00
mdb ab59041083 Added a "Venissonne!" label and a chat box.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@382 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:55:59 +00:00
mdb 40621aee46 Use isOurTurn() and assume our turn is going to be ended if we place a
piece that has no claimable features.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@381 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:55:40 +00:00
mdb cfe1f23ce7 Pulled our update code out into functions and then call all of them when
we enter the game room so that everything starts out in the proper
configuration even if we show up halfway through a game.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@380 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:55:05 +00:00
mdb b4f05bbc0d Syntax jockeying.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@379 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:54:34 +00:00
mdb a03974210b Added string names for describing the feature codes to humans.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@378 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:54:20 +00:00
mdb f5f4f8b336 Update the piecen count when we enter the game room.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@377 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 20:53:53 +00:00
mdb 5a96e13b29 Shrunk the tiles to 64x64.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@376 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 19:08:50 +00:00
mdb 367c4cfa83 Right click now sends PLACE_NOTHING. Removed code to draw black border.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@375 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 18:42:33 +00:00
mdb 6fa026432c Added code to display remaining piecen count for each player.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@374 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 18:10:57 +00:00
mdb 28791449cc End the turn automatically if a player has no playable piecens after they
place their tile.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@373 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 02:19:24 +00:00
mdb cb2f09cab0 Handle multiple -D args properly.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@372 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 02:19:04 +00:00
mdb 72e0998b6f Set things up if we show up in the room and its our turn. Also do the
right thing if we had no piecens to place, but our act of placing a tile
freed up one of our piecens for placement.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@371 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 02:18:47 +00:00
mdb 1b5809f3fa Add code to count piecens from the tile state rather than the piecen set.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@370 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 02:17:54 +00:00
mdb d520132440 Allow reenabling of piecen placement and paint a white rectangle around
the last placed tile.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@369 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-18 02:17:30 +00:00
mdb aa148ebf00 Commented out the piece removal (we're going for a whole game).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@368 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-17 23:28:34 +00:00
mdb 2d029fe059 Revamps galore! Player info display! Working scoring for all cases (we
hope)! It's a glorious day!


git-svn-id: https://samskivert.googlecode.com/svn/trunk@367 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2001-10-17 23:27:52 +00:00