Have you ever been roleplaying, and wanted to show a tic-tac-toe board?
*cough Astra*Well, want no more!
Introducing: [tictactoe]!
And, best of all, this puppy's FUNCTIONAL!
The basic code works like this:
- Code: Select all
[tictactoe=n]string of characters[/tictactoe]
Now, that lovely string of characters can be simply a set of Xs and Os , or whatever you want, like so:
- Code: Select all
[tictactoe=l]O.O.X...X[/tictactoe] [tictactoe=r]123456789[/tictactoe]
And in that case, it looks mighty nice. You will first notice that "=", and following it is an "l", and that stands for left float. Options there include "l" for left float, "r" for right float", "c" for center, and "n" for normal. This means that you can float your game to the side of text.
You will then notice that I have put placeholders in there for blank spaces with periods, but they could just as easily be stars (*), underscores (_), or spaces ( ). Whatever is easier for you to see or remember. You will also note that the symbols go in order (and can technically be anything).
Now, all of those examples have purely just 9 characters for the 9 positions on the board, but that's not all this puppy can do. You can, in fact, highlight a square - any one of them, and any number of them at the same time. Simply put "h" in front of any position, and that square will be highlighted. It can even be an empty space. For example:
- Code: Select all
[tictactoe=c]X*O*hXOh***[/tictactoe]
AND, this baby is FULLY Functional. Guess what happens if you try to display a board with a winning move?
- Code: Select all
[tictactoe=l]X_O_X_OOX[/tictactoe][tictactoe=l]o_x__xoox[/tictactoe][tictactoe=l]__abbbaa_[/tictactoe]
Why it highlights the winning squares automatically, AND it doesn't matter what characters you use, it will still recognize three in a row.
So, There you have it. Feel free to play some tic-tac-toe yourselves, and enjoy the little touch of fun that I've always found it to be.
ANNOUNCEMENT: OJ Had a Great Idea - SUDOKU!
Introducing 3 new alignments: "sl", "sc", and "sr" (sudoku left, sudoku center, and sudoku right) Put these puppies together, and stack it all on ONE line!
- Code: Select all
[tictactoe=sl]123456789[/tictactoe][tictactoe=sc]456789123[/tictactoe][tictactoe=sr]789123456[/tictactoe][tictactoe=sl]231564897[/tictactoe][tictactoe=sc]564897231[/tictactoe][tictactoe=sr]897231564[/tictactoe][tictactoe=sl]312645978[/tictactoe][tictactoe=sc]645978312[/tictactoe][tictactoe=sr]978312645[/tictactoe]