{"size": 2116, "ext": "scrbl", "max_stars_repo_path": "scribblings/pousse.scrbl", "max_stars_repo_name": "samth/games", "max_stars_repo_stars_event_min_datetime": "2015-01-13T15:10:10.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-17T14:43:11.000Z", "max_issues_repo_path": "scribblings/pousse.scrbl", "max_issues_repo_name": "samth/games", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "scribblings/pousse.scrbl", "max_forks_repo_name": "samth/games", "max_forks_repo_forks_event_min_datetime": "2015-03-13T22:19:54.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-28T21:04:36.000Z"}
{"max_stars_count": 48, "max_issues_count": 15, "max_forks_count": 29, "avg_line_length": 33.5873015873, "max_line_length": 70, "alphanum_fraction": 0.702268431}
#lang scribble/doc
@(require "common.rkt")

@gametitle["Pousse" "pousse" "Tic-Tac-Toe-like Game"]

@onscreen{Pousse} (French for ``push,'' pronounced ``poo-ss'') is a 2
person game, played on an @math{N} by @math{N} board (usually 4 by 4).
Initially the board is empty, and the players take turns inserting one
marker of their color (@onscreen{X} or @onscreen{O}) on the board.
The color @onscreen{X} always goes first.  The columns and rows are
numbered from 1 to @math{N}, starting from the top left, as in:

@verbatim[#:indent 3]{
     1 2 3 4
    +-+-+-+-+
  1 | | | | |
    +-+-+-+-+
  2 | | | | |
    +-+-+-+-+
  3 | | | | |
    +-+-+-+-+
  4 | | | | |
    +-+-+-+-+
}

A marker can only be inserted on the board by sliding it onto a
particular row from the left or from the right, or onto a particular
column from the top or from the bottom.  So there are @math{4*N}
possible ``moves'' (ways to insert a marker).  They are named
L@math{i}, R@math{i}, T@math{i}, and B@math{i} respectively, where
@math{i} is the number of the row or column where the insertion takes
place.

When a marker is inserted, there may be a marker on the square where
the insertion takes place.  In this case, all markers on the insertion
row or column from the insertion square up to the first empty square
are moved one square further to make room for the inserted marker.
Note that the last marker of the row or column will be pushed off the
board (and must be removed from play) if there are no empty squares on
the insertion row or column.

A row or a column is a @defterm{straight} of a given color if it
contains @math{N} markers of the given color.

The game ends either when an insertion

@itemize[

@item{repeats a previous configuration of the board; in this case the
      player who inserted the marker LOSES.}

@item{creates a configuration with more straights of one color than
   straights of the other color; the player whose color is dominant
   (in number of straights) WINS.}

]

A game always leads to a win by one of the two players.  Draws are
impossible.

This game is from the 1998 ICFP programming contest.

