package chess2;
import java.util.ArrayList;
public class RulesPrinter {
static String rules = ""+
" \n "+
" \n "+
"Rules"+
" \n "+" \n "+
"  \t \t Since there are six games in the Zebonian Chess package there are actually five sets of rules, but each set builds on rules of the game that appears above it on the menu. Because the program will illustrate the moves that a piece can make when you click on it, you can skip the rules and get right to playing, but the rules are briefly listed here for reference and clarification. For the sake of brevity details on the setup of the games are omitted. It is easy enough to see the setup once you start a game. "+
" \n "+" \n "+
"In all the chess games, but Adultery Chess the objective of the game is to get the other king in checkmate. There are only two variations in checkmate between the six games in this package. First, in Claustrophobic, Monkey, and Peasant Chess it is possible to surround a king with walls and corpses, thus suffocating it. Second, in Peasant Chess it is possible to substitute a wild card piece as a king and to continue playing until the all of a player's wild cards are in checkmate should one's actual king be in checkmate or lost from the board. This also means that it is possible for a player to mind control a king and continue the game  (for the details on these special rules, see below). In Adultery Chess, the objective is instead to get your king and queen adjacent to each other without your opponent being able to do anything about it in one turn. "+
" \n "+" \n "+
"  \t \t Normal Chess"+
" \n "+" \n "+
"  \t \t Board: In regular chess there is a simple 8x8 square board. The only rule that is special to any particular square is pawn promotion, which can only happen on the end of the board opposite of where the pawn started."+
" \n "+" \n "+
"  \t \t Note: no piece can move in such a way that its side's king is left in check, and if the king is in check no piece may move unless to get the king out of check. If no such move is possible, the king is in checkmate, that side loses. In the case that a player can make no more additional moves, but he is not in checkmate, then the game is a draw. "+
" \n "+" \n "+
"  \t \t Pieces:"+
" \n "+" \n "+
"  \t \t Pawn – there are eight pawns. Pawns can move up to two squares at once on their first moved but only one square at a time afterwards. Pawns can only move forwards unless attacking, when they attack a diagonal square adjacent and in front of the square they are on."+
" \n "+" \n "+
"  \t \t Bishop – like every piece but the pawn, king and queen, there are two of these. Bishops can only move diagonally."+
" \n "+" \n "+
"  \t \t Rook – a rook can only move horizontally and vertically."+
" \n "+" \n "+
"  \t \t Queen – each player starts with only one queen. The queen can move as many squares as possible diagonally, vertically and horizontally."+
" \n "+" \n "+
"  \t \t King – there can be only one king per player on the board. The king can move one square diagonally, vertically, or horizontally."+
" \n "+" \n "+
"  \t \t Knight – a knight  moves in an “L” shape: one or two squares in a vertical or horizontal direction, and then one (if two before) or two (if one before) squares in a vertical (if horizontal before) or horizontal (if vertical before) direction. The knight can pass through other pieces in its path. "+
" \n "+" \n "+
"  \t \t Special rules:"+
" \n "+" \n "+
"  \t \t Pawn promotion – if a pawn reaches the last row of the side of the board opposite the side it started on (the side of the board its opponent starts on) it gets promoted to any other piece in regular chess except a king."+
" \n "+" \n "+
"  \t \t En Passant – a pawn can move one square diagonally to the square behind an enemy pawn if that enemy pawn has just moved two squares forward. The enemy pawn is then killed. "+
" \n "+" \n "+
"  \t \t Castling – a rook moves horizontally until it reaches the king, and then the king moves to the square on the other side of the rook. Castling can only take place if the king is not in check, there are no piece between the king and the rook castling, and neither piece has moved. "+
" \n "+" \n "+
"  \t \t Insecure Chess:"+
" \n "+" \n "+
"  \t \t Board: the board is the same as in regular chess, except that the four center squares are known as “the Barrel”. No piece may move out of the Barrel once in, and no piece may pass through the Barrel to get to a square outside the Barrel. "+
" \n "+" \n "+
"  \t \t Note: all piece movements for regular pieces are the same as in normal chess, with the exception of the Barrel rule. "+
" \n "+" \n "+
"  \t \t Pieces:"+
" \n "+" \n "+
"  \t \t Mystery Piece – the mystery piece appears after a player has killed an opponent's piece for three turns in a row. The mystery piece appears where the last piece moved by its player started. The mystery piece moves in an L shape like a knight, but the movements are diagonal rather than vertical and horizontal. The mystery piece cannot move if it must cross the Barrel in its path and the square it is to land on isn't in the Barrel. "+
" \n "+" \n "+
"  \t \t Special rules: "+
" \n "+" \n "+
"  \t \t Mind control – When a player has three different pieces at once that are able to kill an opponent's piece then that piece switches to the opponent's side. Mind controlling counts towards a mind controlling player's mystery piece. If both sides are able to mind control a piece then that piece is destroyed with the kill counting towards neither side for gaining a mystery piece."+
" \n "+" \n "+
"  \t \t Claustrophobic Chess:"+
" \n "+" \n "+
"  \t \t Note: All rules from Normal and Insecure Chess apply to Claustrophobic as well. The only addition are the walls and cannibalizing."+
" \n "+" \n "+
"  \t \t Special rules:"+
" \n "+" \n "+
"  \t \t Wall Creation – when a piece moves a wall appears where it moved from, except if a mystery piece appears in that place instead."+
" \n "+" \n "+
"  \t \t Suffocation – a piece does not suffocate as long as it is adjacent to an empty square or adjacent to another piece that itself is not suffocated, either because it is adjacent to an empty square or it too is adjacent to a piece that is not suffocated. If the king is suffocated then it is in checkmate."+
" \n "+" \n "+
"  \t \t Cannibalizing – A king can kill its own piece. It gains an “air bottle”, shown by a number marked on the king, when it does so. If a king is suffocated, it can spend one air bottle a turn until it runs out of air bottles before its suffocation counts as a checkmate."+
" \n "+" \n "+
"  \t \t Monkey Chess:"+
" \n "+" \n "+
"  \t \t Board: the Barrel is now known as the “Boomwater Well”. It behaves like the Barrel but pawns can explode inside it. When a pawn explodes inside it every square inside of and adjacent to the well explodes with it and then the Boomwater Well ceases to exist, meaning pieces can pass through it like on a normal chessboard. "+
" \n "+" \n "+
"  \t \t Pieces:"+
" \n "+" \n "+
"  \t \t Corpse – whenever a piece is killed, rather than that piece leaving the board, it turns into a corpse. The piece that killed it is then one level higher, as it is on top of the corpse. "+
" \n "+" \n "+
"  \t \t Toaster – the toaster is somewhat part of the board and somewhat a special piece. The toaster only exists where the king and queen start. A toaster can fire anything that is inside it. The toaster can fire in either direction horizontally, vertically, or diagonally, provided that firing does not leave its player without a king or its king in checkmate. When a toaster fires, pieces in either square are fired, but the toaster can fire if only one of its squares is loaded. When a piece or wall is fired from the toaster, it continues to fly until it either hits another square that's filled (thereby clearing that square) or it flies off the board. "+
" \n "+" \n "+
"  \t \t Monkeys – a pawn turns into a monkey when it is two squares away from the opponent king. A monkey must move two squares, but it can move to one square and then back. This means that it can even move to its own square, provided that it can move to an adjacent square first. The monkey can move one level upwards in its movements. "+
" \n "+" \n "+
"  \t \t Tanks – a tank is a mobile toaster. A tank is created when a king jumps three or more corpses in the location of the king's originating point and the square that the king first jumped. The tank can only move to the square in front of it (where the tank drawing's gun is pointed). A tank can rotate perpendicularly provided that there is no square in its rotation path. A tank can fire pieces (including walls) within it the same way a toaster can. It can also suck in pieces adjacent to one of its squares. If a tank is attacked the tank is destroyed but leaves behind no corpse, pieces within it remain intact, the piece that attacked it does not move, and the kill does not count towards a mystery piece. Tank movements leave behind no walls. Tanks cannot change levels. "+
" \n "+" \n "+
"  \t \t Taco Fiend: a taco fiend can move like every single piece except for the tank, king, and toaster. It appears if a king has jumped three or more corpses in one turn and the Boomwater Well hasn't been exploded."+
" \n "+" \n "+
"  \t \t Special rules:"+
" \n "+" \n "+
"  \t \t Levels – corpses and walls can count towards levels. Unless the piece is a monkey, a piece can only move one level up when it kills a piece. It is possible to move one level up to kill a piece that is on the square that the piece rises one level to. A piece can move down one square at a time in a sort of “descending staircase” style, but if it moves down more than one level from one square to another it is “committing suicide”. "+
" \n "+" \n "+
"  \t \t Pawn explosion – a pawn can explode, clearing itself and every single square around it. "+
" \n "+" \n "+
"  \t \t Suicide – when a piece moves down more than one level from one square to another it commits suicide and disappears from the board after the move. However, in committing suicide it is still possible to kill a piece."+
" \n "+" \n "+
"  \t \t Corpse jumping – a king can jump over a corpse provided that the level across the corpse is the same as the level it started on and the difference between the level of its initial square and the corpse or corpse stack's square is no greater than the number of corpses in the stack (the king, if on a clear square, can't jump over corpses that are on top of walls). In the same turn a king may jump over another corpse, originating from the square it just landed, and may do so indefinitely, with the same rules of corpse jumping applying. If a king jumps one corpse in a turn a pawn appears in its initial square. If a king jumps two corpses in one turn a monkey appears, and if it jumps three squares a tank appears if the Boomwater Well has been exploded or a taco fiend appears if it hasn't."+
" \n "+" \n "+
"  \t \t Peasant Chess:"+
" \n "+" \n "+
"  \t \t Board: there is a special rule for every square in rows 4 and 5. A4, A5, H4, and H5 are known as the “disco area”. In the disco area a piece turns into a wild card piece, but it turns back into its original piece upon leaving the disco area. B4, B5, G4, and G5 are the “permanent walls”. These are walls that exist regardless of pawn explosion or toaster or tank firing. If a knight or mystery piece moves through the permanent walls it commits suicide. C4, C5, G4, and G5, are known as the “chapel”. A piece in the chapel may “wed” an enemy piece adjacent to the chapel and make it of the same side as the piece in the chapel. Some exceptions to this rule are the so called “perversions”: marrying a corpse, marrying a rook, marrying a tank, and marrying the same type of piece as the piece doing the marrying. A “perversion” can only take place if a piece's side has no bishops on the board but does have at least one wild card. A tank can only marry if its front is in the chapel."+
" \n "+" \n "+
"  \t \t Note: Due to wild cards it is possible to have zero or two kings, if a player's king is mind controlled, killed, or flung. "+
" \n "+" \n "+
"  \t \t Pieces:"+
" \n "+" \n "+
"  \t \t Wild Card – when a piece enters the disco area it becomes a wild card. A wild card can move and act as any piece, even as a substitute for a king (though it can't cannibalize or jump corpses). If a player has a wild card he can get his king in checkmate or even fling the king or explode him, provided that the wild card isn't in check. When a wild card leaves the disco area it turns into its original piece."+
" \n "+" \n "+
"  \t \t Adultery Chess:"+
" \n "+" \n "+
"  \t \t Board: The only thing special about the board in Adultery Chess is the rule regarding King and Queen regeneration at their original square."+
" \n "+" \n "+
"  \t \t Pieces:"+
" \n "+" \n "+
"  \t \t Pawns – pawns can move forwards and backwards, and their diagonal attacks can be in front or behind them. They cannot promote. "+
" \n "+" \n "+
"  \t \t King and Queen – both pieces can only move one square at a time. When killed, they regenerate at their original square, killing any piece on top of the square at the time. They cannot kill the opponent's king or queen."+
" \n "+" \n "+
"  \t \t Special Rules:"+
" \n "+" \n "+
"  \t \t Special Objective – instead of getting the king in checkmate, the objective of this game is to unite your king and queen without your opponent being able to do anything about the turn after uniting the two."+
" \n "+" \n "+
"  \t \t Enjoy the games!";

static String credits =
" \n "+" \n "+
"                                      Games by Daniel Dilger and Jack Ferguson"+
" \n "+
        " \n "+
"                                                   Programming by Daniel Dilger"+
" \n"+
        " \n "+
"                                                     Graphics by Jack Ferguson"+
    " \n"+
        " \n "+
"                                       Visit the creators at www.CTUniverse.net"+
        " \n"+
        " \n ";
static String hotKeys =
        "  Special Commands                                   Pawn Promotion"+
        "\n "+ " \n "+ " \n "+
         "C: King cannibalize another piece           B: Promote Pawn to Bishop"+
        " \n "+
        "D: Drop piece from Tank                           K: Promote Pawn to Knight"+
        " \n "+
        "E: Explode Pawn                                         Q: Promote Pawn to Queen (default)"+
        " \n "+
        "F: Fire piece from Tank or Toaster          R: Promote Pawn to Rook"+
        " \n "+
        "M: Return to Menu"+
        " \n "+
        "N: New Game"+
        " \n "+
        "S: Suck piece into Tank"+
        " \n "+
        "T: Enter Tank"+
        " \n "+
        "V: View board (after end of game)"+
        " \n "+
        "W: Wed piece"+
        " \n "+
        "X: Castle"+
        " \n ";
static String insecureHotKeys =
        "  Special Commands                                         Pawn Promotion"+
        "\n "+ " \n "+ " \n "+
        "C: Cannibalize (click on King)                         B: Promote Pawn to Bishop"+
        " \n "+
        "M: Return to Menu                                              K: Promote Pawn to Knight"+
        " \n "+
        "N: New Game                                                     P: Promote Pawn to Pawn"+
        " \n "+
        "V: View board at the end of a game               Q: Promote Pawn to Queen (default)"+
        " \n "+
        "X: Castle (click on Rook)                                  R: Promote Pawn to Rook"+
        " \n ";
static String insecureRules =
        "  \t \t Rules"+
" \n "+
        " \n "+
"  \t \t Insecure Chess includes the rules for normal chess, so we have listed those rules as well. For the sake of brevity details on the setup of the game are omitted. It is easy enough to see the setup once you start a game. Feel free to dive right into the game, as the board will illustrate what moves you can make when you click on a piece. (Except for castling, when you will also have to press “X”). "+
" \n "+
        " \n "+
"  \t \t Normal Chess"+
" \n "+
        " \n "+
"  \t \t Board: In regular chess there is a simple 8x8 square board. The only rule that is special rule for the board is pawn promotion, which can only happen on the end of the board opposite of where the pawn started."+
" \n "+
        " \n "+
"  \t \t Note: no piece can move in such a way that its side's king is left in check, and if the king is in check no piece may move unless to get the king out of check. If no such move is possible, the king is in checkmate, that side loses. In the case that a player can make no more additional moves, but he is not in checkmate, then the game is a draw."+
" \n "+
        " \n "+
"  \t \t Pieces:"+
" \n "+
        " \n "+
"  \t \t Pawn – there are eight pawns. Pawns can move up to two squares at once on their first moved but only one square at a time afterwards. Pawns can only move forwards unless attacking, when they attack a diagonal square adjacent and in front of the square they are on. "+
" \n "+
        " \n "+
"  \t \t Bishop – like every piece but the pawn, king and queen, there are two of these. Bishops can only move diagonally."+
" \n "+
        " \n "+
"  \t \t Rook – a rook can only move horizontally and vertically."+
" \n "+
        " \n "+
"  \t \t Queen – each player starts with only one queen. The queen can move as many squares as possible diagonally, vertically and horizontally."+
" \n "+
        " \n "+
"  \t \t King – there can be only one king per player on the board. The king can move one square diagonally, vertically, or horizontally."+
" \n "+
        " \n "+
"  \t \t Knight – a knight  moves in an “L” shape: one or two squares in a vertical or horizontal direction, and then one (if two before) or two (if one before) squares in a vertical (if horizontal before) or horizontal (if vertical before) direction. The knight can pass through other pieces in its path."+
" \n "+
        " \n "+
"  \t \t Special rules:"+
" \n "+
        " \n "+
"  \t \t Pawn promotion – if a pawn reaches the last row of the side of the board opposite the side it started on (the side of the board its opponent starts on) it gets promoted to any other piece in regular chess except a king."+
" \n "+
        " \n "+
"  \t \t En Passant – a pawn can move one square diagonally to the square behind an enemy pawn if that enemy pawn has just moved two squares forward. The enemy pawn is then killed. "+
" \n "+
        " \n "+
"  \t \t Castling – a rook moves horizontally until it reaches the king, and then the king moves to the square on the other side of the rook. Castling can only take place if the king is not in check, there are no piece between the king and the rook castling, and neither piece has moved. "+
" \n "+
        " \n "+
"  \t \t Insecure Chess:"+
" \n "+
        " \n "+
"  \t \t Board: the board is the same as in regular chess, except that the four center squares are known as “the Barrel”. No piece may move out of the Barrel once in, and no piece may pass through the Barrel to get to a square outside the Barrel. "+
" \n "+
        " \n "+
"  \t \t Note: all piece movements for regular pieces are the same as in normal chess, with the exception of the Barrel rule. "+
" \n "+
        " \n "+
"  \t \t Pieces:"+
" \n "+
        " \n "+
"  \t \t Mystery Piece – the mystery piece appears after a player has killed an opponent's piece for three turns in a row. The mystery piece appears where the last piece moved by its player started. The mystery piece moves in an L shape like a knight, but the movements are diagonal rather than vertical and horizontal. The mystery piece cannot move if it must cross the Barrel in its path and the square it is to land on isn't in the Barrel. "+
" \n "+
        " \n "+
"  \t \t Special rules:"+
" \n "+
        " \n "+
"  \t \t Mind control – When a player has three different pieces at once that are able to kill an opponent's piece then that piece switches to the opponent's side. Mind controlling counts towards a mind controlling player's mystery piece. If both sides are able to mind control a piece then that piece is destroyed with the kill counting towards neither side for gaining a mystery piece."+
" \n "+
        " \n "+
"  \t \t Enjoy the game!"+
        " \n "+
        " \n ";

static String claustrophobicRules =
        "  \t \t Rules"+
" \n "+
        " \n "+
"  \t \t Insecure Chess includes the rules for normal chess, so we have listed those rules as well. For the sake of brevity details on the setup of the game are omitted. It is easy enough to see the setup once you start a game. Feel free to dive right into the game, as the board will illustrate what moves you can make when you click on a piece. (Except for castling, when you will also have to press “X”)."+
" \n "+
        " \n "+
"  \t \t Normal Chess"+
" \n "+
        " \n "+
"  \t \t Board: In regular chess there is a simple 8x8 square board. The only rule that is special to any particular square is pawn promotion, which can only happen on the end of the board opposite of where the pawn started."+
" \n "+
        " \n "+
"  \t \t Note: no piece can move in such a way that its side's king is left in check, and if the king is in check no piece may move unless to get the king out of check. If no such move is possible, the king is in checkmate, that side loses. In the case that a player can make no more additional moves, but he is not in checkmate, then the game is a draw. "+
" \n "+
        " \n "+
"  \t \t Pieces: "+
" \n "+
        " \n "+
"Pawn – there are eight pawns. Pawns can move up to two squares at once on their first moved but only one square at a time afterwards. Pawns can only move forwards unless attacking, when they attack a diagonal square adjacent and in front of the square they are on. "+
" \n "+
        " \n "+
"Bishop – like every piece but the pawn, king and queen, there are two of these. Bishops can only move diagonally. "+
" \n "+
        " \n "+
"Rook – a rook can only move horizontally and vertically. "+
" \n "+
        " \n "+
"Queen – each player starts with only one queen. The queen can move as many squares as possible diagonally, vertically and horizontally. "+
" \n "+
        " \n "+
"King – there can be only one king per player on the board. The king can move one square diagonally, vertically, or horizontally. "+
" \n "+
        " \n "+
"Knight – a knight  moves in an “L” shape: one or two squares in a vertical or horizontal direction, and then one (if two before) or two (if one before) squares in a vertical (if horizontal before) or horizontal (if vertical before) direction. The knight can pass through other pieces in its path. "+
" \n "+
        " \n "+
"Special rules: "+
" \n "+
        " \n "+
"Pawn promotion – if a pawn reaches the last row of the side of the board opposite the side it started on (the side of the board its opponent starts on) it gets promoted to any other piece in regular chess except a king."+
" \n "+
        " \n "+
"En Passant – a pawn can move one square diagonally to the square behind an enemy pawn if that enemy pawn has just moved two squares forward. The enemy pawn is then killed. "+
" \n "+
        " \n "+
"Castling – a rook moves horizontally until it reaches the king, and then the king moves to the square on the other side of the rook. Castling can only take place if the king is not in check, there are no piece between the king and the rook castling, and neither piece has moved. "+
" \n "+
        " \n "+
"Insecure Chess:"+
" \n "+
        " \n "+
"Board: the board is the same as in regular chess, except that the four center squares are known as “the Barrel”. No piece may move out of the Barrel once in, and no piece may pass through the Barrel to get to a square outside the Barrel. "+
" \n "+
        " \n "+
"Note: all piece movements for regular pieces are the same as in normal chess, with the exception of the Barrel rule. "+
" \n "+
        " \n "+
"Pieces: "+
" \n "+
        " \n "+
"Mystery Piece – the mystery piece appears after a player has killed an opponent's piece for three turns in a row. The mystery piece appears where the last piece moved by its player started. The mystery piece moves in an L shape like a knight, but the movements are diagonal rather than vertical and horizontal. The mystery piece cannot move if it must cross the Barrel in its path and the square it is to land on isn't in the Barrel."+
" \n "+
        " \n "+
"Special rules:"+
" \n "+
        " \n "+
"Mind control – When a player has three different pieces at once that are able to kill an opponent's piece then that piece switches to the opponent's side. Mind controlling counts towards a mind controlling player's mystery piece. If both sides are able to mind control a piece then that piece is destroyed with the kill counting towards neither side for gaining a mystery piece."+
" \n "+
        " \n "+
"Claustrophobic Chess:"+
" \n "+
        " \n "+
"Note: All rules from Normal and Insecure Chess apply to Claustrophobic as well. The only addition are the walls and cannibalizing."+
" \n "+
        " \n "+
"Special rules:"+
" \n "+
        " \n "+
"Wall Creation – when a piece moves a wall appears where it moved from, except if a mystery piece appears in that place instead."+
" \n "+
        " \n "+
"Suffocation – a piece does not suffocate as long as it is adjacent to an empty square or adjacent to another piece that itself is not suffocated, either because it is adjacent to an empty square or it too is adjacent to a piece that is not suffocated. If the king is suffocated then it is in checkmate."+
" \n "+
        " \n "+
"Cannibalizing – A king can kill its own piece. It gains an “air bottle”, shown by a number marked on the king, when it does so."+
" \n "+
        " \n "+
"Air Draining –  If a king is suffocated, it can spend one air bottle a turn until it runs out of air bottles before its suffocation counts as a checkmate."+
        " \n "+
        " \n "+
"Enjoy the game!"+
        " \n "+
        " \n ";
static String adulteryRules =

 "  \t \t Rules"+
" \n "+
        " \n "+
"  \t \t Each chess game includes the rules for normal chess, so we have listed those rules as well. For the sake of brevity details on the setup of the game are omitted. It is easy enough to see the setup once you start a game. Feel free to dive right into the game, as the board will illustrate what moves you can make when you click on a piece. (Except for castling, when you will also have to press “X”). "+
" \n "+
        " \n "+
"  \t \t Normal Chess"+
" \n "+
        " \n "+
"  \t \t Board: In regular chess there is a simple 8x8 square board. The only rule that is special to any particular square is pawn promotion, which can only happen on the end of the board opposite of where the pawn started."+
" \n "+
        " \n "+
"  \t \t Note: no piece can move in such a way that its side's king is left in check, and if the king is in check no piece may move unless to get the king out of check. If no such move is possible, the king is in checkmate, that side loses. In the case that a player can make no more additional moves, but he is not in checkmate, then the game is a draw. "+
" \n "+
        " \n "+
"  \t \t Pieces:"+
" \n "+
        " \n "+
"  \t \t Pawn – there are eight pawns. Pawns can move up to two squares at once on their first moved but only one square at a time afterwards. Pawns can only move forwards unless attacking, when they attack a diagonal square adjacent and in front of the square they are on."+
" \n "+
        " \n "+
"  \t \t Bishop – like every piece but the pawn, king and queen, there are two of these. Bishops can only move diagonally."+
" \n "+
        " \n "+
"  \t \t Rook – a rook can only move horizontally and vertically."+
" \n "+
        " \n "+
"  \t \t Queen – each player starts with only one queen. The queen can move as many squares as possible diagonally, vertically and horizontally."+
" \n "+
        " \n "+
"  \t \t King – there can be only one king per player on the board. The king can move one square diagonally, vertically, or horizontally."+
" \n "+
        " \n "+
"  \t \t Knight – a knight  moves in an “L” shape: one or two squares in a vertical or horizontal direction, and then one (if two before) or two (if one before) squares in a vertical (if horizontal before) or horizontal (if vertical before) direction. The knight can pass through other pieces in its path."+
" \n "+
        " \n "+
"  \t \t Special rules:"+
" \n "+
        " \n "+
"  \t \t Pawn promotion – if a pawn reaches the last row of the side of the board opposite the side it started on (the side of the board its opponent starts on) it gets promoted to any other piece in regular chess except a king."+
" \n "+
        " \n "+
"  \t \t En Passant – a pawn can move one square diagonally to the square behind an enemy pawn if that enemy pawn has just moved two squares forward. The enemy pawn is then killed."+
" \n "+
        " \n "+
"  \t \t Castling – a rook moves horizontally until it reaches the king, and then the king moves to the square on the other side of the rook. Castling can only take place if the king is not in check, there are no piece between the king and the rook castling, and neither piece has moved."+
" \n "+
        " \n "+
"  \t \t Insecure Chess:"+
" \n "+
        " \n "+
"  \t \t Board: the board is the same as in regular chess, except that the four center squares are known as “the Barrel”. No piece may move out of the Barrel once in, and no piece may pass through the Barrel to get to a square outside the Barrel."+
" \n "+
        " \n "+
"  \t \t Note: all piece movements for regular pieces are the same as in normal chess, with the exception of the Barrel rule."+
" \n "+
        " \n "+
"  \t \t Pieces:"+
" \n "+
        " \n "+
"  \t \t Mystery Piece – the mystery piece appears after a player has killed an opponent's piece for three turns in a row. The mystery piece appears where the last piece moved by its player started. The mystery piece moves in an L shape like a knight, but the movements are diagonal rather than vertical and horizontal. The mystery piece cannot move if it must cross the Barrel in its path and the square it is to land on isn't in the Barrel."+
" \n "+
        " \n "+
"  \t \t Special rules:"+
" \n "+
        " \n "+
"  \t \t Mind control – When a player has three different pieces at once that are able to kill an opponent's piece then that piece switches to the opponent's side. Mind controlling counts towards a mind controlling player's mystery piece. If both sides are able to mind control a piece then that piece is destroyed with the kill counting towards neither side for gaining a mystery piece."+
" \n "+
        " \n "+
"  \t \t Claustrophobic Chess:"+
" \n "+
        " \n "+
"  \t \t Note: All rules from Normal and Insecure Chess apply to Claustrophobic as well. The only addition are the walls and cannibalizing."+
" \n "+
        " \n "+
"  \t \t Special rules:"+
" \n "+
        " \n "+
"  \t \t Wall Creation – when a piece moves a wall appears where it moved from, except if a mystery piece appears in that place instead."+
" \n "+
        " \n "+
"  \t \t Suffocation – a piece does not suffocate as long as it is adjacent to an empty square or adjacent to another piece that itself is not suffocated, either because it is adjacent to an empty square or it too is adjacent to a piece that is not suffocated. If the king is suffocated then it is in checkmate."+
" \n "+
        " \n "+
"  \t \t Cannibalizing – A king can kill its own piece. It gains an “air bottle”, shown by a number marked on the king, when it does so."+
" \n "+
        " \n "+
"  \t \t Air Draining –  If a king is suffocated, it can spend one air bottle a turn until it runs out of air bottles before its suffocation counts as a checkmate."+
" \n "+
        " \n "+
"  \t \t Adultery Chess:"+
" \n "+
        " \n "+
"  \t \t Board: The only thing special about the board in Adultery Chess is the rule regarding King and Queen regeneration at their original square."+
" \n "+
        " \n "+
"  \t \t Pieces:"+
" \n "+
        " \n "+
"  \t \t Pawns – pawns can move forwards and backwards, and their diagonal attacks can be in front or behind them. They cannot promote."+
" \n "+
        " \n "+
"  \t \t King and Queen – both pieces can only move one square at a time. When killed, they regenerate at their original square, killing any piece on top of the square at the time. They cannot kill the opponent's king or queen."+
" \n "+
        " \n "+
"  \t \t Special Rules:"+
" \n "+
        " \n "+
"  \t \t Special Object – instead of getting the king in checkmate, the objective of this game is to unite your king and queen without your opponent being able to do anything about the turn after uniting the two."+
" \n "+
        " \n "+
"  \t \t Enjoy the games!"+
   " \n "+
        " \n ";
public static ArrayList<String> dividedString(String string){
    ArrayList<String> dividedRules = new ArrayList();
    String[] splitString = string.split(" ");
    String line = "";
    int linechar = 0;
    final int maxchars = 60;
    for (String str: splitString){

        if (str.equals("\n")||(str.length()+linechar>maxchars)){
            dividedRules.add(line);
            line = "";
            linechar = 0;
        }

            linechar += str.length();
            line += str;
            line += " ";


    }

    return dividedRules;
}
public static ArrayList<String> dividedClaustrophobicRules(){
    return dividedString(claustrophobicRules);
}
public static ArrayList<String> dividedAdulteryRules(){
    return dividedString(adulteryRules);
}
public static ArrayList<String> dividedRules(){

    return dividedString(rules);
}
public static ArrayList<String> dividedCredits(){
    return dividedString(credits);
}
public static ArrayList<String> dividedHotKeys(){
    return dividedString(hotKeys);
}
public static ArrayList<String> dividedInsecureHotKeys(){
    return dividedString(insecureHotKeys);
}
public static ArrayList<String> dividedInsecureRules(){
    return dividedString(insecureRules);
}

}
