Dots & Boxes - A Multiplayer phone-to-phone game for Android

gameplay.png31.3 KB

Dots & Boxes is another puzzle game for Android devices.  It is an Android version of a classic pencil-and-paper game you enjoyed as a youngster.  In this game, players draws lines to create boxes.  A player that completes a box by drawing the fourth edge of the box is awarded ownership of the box.  The game ends when there are no more lines to draw, and all the boxes are owned. Whoever owns more boxes at the end of the game wins.  Here are some of the features of the game:

  1. Play against the computer or against your friends.
  2. Play against your friends phone-to-phone.  The game uses SMS messages (aka "text messages") to send moves back and forth.  There is no central server that sees your moves.  There are therefore no connectivity or privacy issues.
  3. When playing against your friends, there are no limits on the number of simultaneous games you can play, or the frequency of moves, as there are with some other multiplayer games.

How to Play

Each player draws lines to complete boxes.  Play typically proceeds by players drawing lines more or less at random, merely trying to avoid adding the third side to a box, because that would allow the opponent to immediately claim the box.  At some point a player is forced to add the third side of a box, at which point each player tries to claim the most boxes for themselves, while giving up the fewest to their opponent.  The player that owns the most boxes wins.  In the case of a tie score, there is a setting that will determine whether the game should be called a tie or if the win should be awarded to the player that moved second.

Game Playing Area

The latest move is shown with a thin red line drawn on top of it.  You can choose what move to make by touching the area of the screen between two dots you would like to connect.  You can also use the directional pad keys or a trackball.  You can change your mind as often as you like before actually making the move.  Once you are satisfied with your move, press the "Make Move" button, if playing against the computer, or "Send Move" button, if playing against another person.  When using the directional key pad to select a move, press the center button to toggle the direction of the line from vertical to horizontal and the Enter key once you are happy with your selection, to cause the keyboard focus to leave the playing area.  Remember, if the line you've selected closes the last edge of a box, you must continue to move until you've made a move that doesn't close the last edge of a box.

Multiplayer Games

It's particularly fun to compete against your friends.  You play on your phone and they play on theirs.  Note that each player must have the Dots & Boxes game installed on their Android device.  If you invite somebody to play and they don't already have the game installed, they will receive a text message saying that you'd like to play and telling them how to install Dots & Boxes on their phone.  When you send an invitation or make a move, if it's your turn, the other player sees a notification indicating that there is an invitation to accept or reject, or that it is now their turn to move.  There is no time limit to a game.  Play over the course of a few minutes or a few months.

SMS Messages

Dots & Boxes exchanges invitations, moves, and responses with other players using SMS messages (aka, "text messages").  On the receiving side, Dots & Boxes receives these messages and performs game operations, notifying the user when their opponent has made a move or invited them to play a game, for example.  Some plans charge extra for SMS messages, so be aware of the SMS usage.  Dots & Boxes sends one SMS message for any of the following:

  • An invitation.
  • An invitation response.
  • A new move.  If a move involves the drawing of more than 20 lines, the move is sent in multiple messages, with each message describing 20 lines.
  • If a player quits the game.
  • If a player reminds the other to move.  How often you can remind your opponent to move is limited.  Your first reminder cannot be sent for at least an hour after you've moved.  After that, you can send at most one reminder per 24 hours, for that game.
  • A game probe.  If you invite somebody to play and you've never played with them before, a "probe" is sent to see if they have Dots & Boxes installed.  This is a normally-formatted text message that will be readable to somebody if the game is not installed.  A probe is sent to a user only once, when you first invite that user to play.  On subsequent invitations, there is no need to send a probe.
  • A probe response.

Single-Player Games

You can practice your technique by playing against the computer.  The default difficulty is "moderate" and can be changed using the "Settings" menu item.  Note when using the higher difficulties, it may take a noticeable amount of time for the computer to choose a move.  You can change the difficulty of a game in progress by changing the difficulty setting at any time.  Even at the high difficulties, the computer does not play a perfect game, but it can be a challenging opponent against casual players.

On the "easy" difficulty setting, the computer will not make "double cross" moves.  That is, the computer will always claim whatever boxes are available to it.  On the other difficulty settings, the computer will avoid taking some boxes if it thinks there is a future advantage to that tactic.

Unlimited Simultaneous Games

You can have several games running at the same time, some against the computer, and some against various friends.  You can even play multiple simultaneous games against the same friend.  All of your active games are shown on the first "introduction" screen.

Introduction List


We think it's important that developers disclose what their applications are doing with certain permissions, so here is our description for this application.  The following standard Android permissions are needed for the game.  This is an explanation of each permission and a description of what it is used for:

  • SEND_SMS, RECEIVE_SMS -- The program sends and receives SMS messages to exchange invitations and move information.
  • READ_CONTACTS - This permission is needed to translate a phone number into a display name from your contacts list, and to fetch an image thumbnail of the contact to display on the screen that contains a list of in-progress games.  This permission is also needed to launch the "contact picker" activity, to let you easily choose your opponent from among your contacts.
  • WAKE_LOCK - This permission is used to briefly prevent the device from going into a low-power sleep mode.  When an SMS message destined for the program is received, an Android "service" is created to process it.  The service parse the message, updates the game information, and raises a notification.  A "wake lock" is used during this time to prevent the phone from sleeping.  Rest assured the wake lock is held for as brief a period of time as possible, and the service does not run all the time.
  • VIBRATE - This permission is needed to provide haptic feedback indicating you have touched a part of the playing area, but that it is not valid to place a move there.
  • RECEIVE_BOOT_COMPLETED - When you make a move or invite a friend to play, there's a chance that you don't have phone service at that time.  In a case like that, the program periodically retries sending the message.  This permission allows the program to run when the device has finished booting up to check if there are outgoing messages that need to be sent.  If the outgoing queue is empty, very little code runs at bootup, and
    service that performs this check completes immediately so there will be no unnecessary memory usage on your device.
  • WRITE_EXTERNAL_STORAGE - This permission is used to export the program's database to the SD card for offline debugging.  If this proves to be not very useful, this code will be deleted and this permission will no longer be required.

Content Rating

The Android Market uses a content-rating system for applications.  This application is rated "Low Maturity".  According to Google's guidelines, it cannot be labelled "Everyone" since it enables "communication between users".  Our application can send game moves and such to another user and even allows the user to include a short text message with the move.  We assume this communication falls into the definition of that phrase.

Install Dots & Boxes on your Phone

Go to the Android Market page for Dots & Boxes to install the application from a browser.  Alternatively, if you have a program like Barcode Scanner installed on your phone, you can scan this barcode to direct the Android Market application on your phone to view the Dots & Boxes application.  You can then download it if you wish.

QR code

Version History

If you are interested in the evolution of Dots & Boxes, here is the version history so far.


Some players take their Dots & Boxes games seriously.  Some people have analyzed the game in some detail.  Others focus on advanced game strategies.