Saturday 15 December 2007

Battleship 2008 - GEOMETRY datatype sample

Here's a quick example of the new coordinate datatypes in SQL Server 2008, in the form of a game!

Battleship 2008 - GEOMETRY datatype and spatial functions in SQL Server (and on CodeProject) uses the basics - POINT and LINESTRING - to build a simple, single-player version of the game Battleship

This is what a game "looks like" (13 is the GameId, 4 is my PlayerId... the other numbers are the co-ordinates I'm shooting at)

it's played in Management Studio, like a 'command line', so you'll need to keep your own copy of the board on paper (like this?)


Enjoy!

2 comments:

  1. Does this mean you'll be taking on the 'Battleship coding challenge'? :)

    ReplyDelete
  2. Only if I can think of somewhere to 'host' SQL Server 2008 on the web. Thinking it might be possible to host the webservice inside SQL too, and write the whole thing in T-SQL :)

    Otherwise it's back to SilverlightEarth...

    ReplyDelete

Note: only a member of this blog may post a comment.