Reviewing code is fun! Use this tag to identify your post as an entry to the current community challenge. See the Community Bulletin, or browse the CR Meta site for more info.
11
votes
4answers
513 views
Tictactics implementation
I've tried to take the shortest, simplest path to a C# solution to the Ultimate Tic-Tac-Toe challenge. This implementation plays in the console. I admit the game logic could be hived off into a ...
13
votes
3answers
1k views
Ultimate Tic-Tac-Toe data model
This is another entry for The Ultimate Tic-Tac-Toe review.
My design criteria were:
A DLL which encapsulates the data, i.e. the game state
Don't include the GUI, nor the decision-making ...
10
votes
3answers
150 views
Ultimate Tic-Tac-Toe Challenge
This is my attempt at the Ultimate Tic-Tac-Toe code challenge.
It uses jQuery to build out the game grid and find the states of all the "buttons" (actually <div>s) when calculating whether or ...
8
votes
3answers
129 views
TicTactics GameBoard Logic
This is my take at the current code-challenge, Ultimate Tic-Tac-Toe.
It all started with a CellValue and a BoardPosition:
/// <summary>
/// Identifies the players, or the possible values a ...
7
votes
1answer
55 views
TicTactics Presentation
This is my take at the current code-challenge, Ultimate Tic-Tac-Toe, at least the presentation part.
As I chose to write a WPF application for my game, and this is my very first time fiddling with a ...
15
votes
3answers
696 views
View for Ultimate Tic-Tac-Toe board
I've put together a board for Ultimate Tic-Tac-Toe (What's that?). This is part of the current code-challenge: Code a Ultimate Tic-Tac-Toe
Resources:
Live demo of my view – For you to see ...
14
votes
5answers
1k views
Tic-tac-toe 'get winner' algorithm
As a first step to attempting the Weekend Challenger Reboot, I decided to first implement a regular 'tic-tac-toe' game and then expand it later to be 'ultimate tic-tac-toe'.
Below is the code for the ...
11
votes
1answer
168 views
Weekend Challenge - Belle's Christmas
My entry for Weekend Challenge #5.
In scope :
Old Skool green on black text adventure
Keyboard handling
A story with 2 mini-quests
2 endings
Virtues ( Hi Ultima ) save the day
Out of scope :
...
9
votes
1answer
196 views
Simple Text Adventure: Cleaning up after the party
This week's Code Review Weekend Challenge is about implementing a simple console game.
Here's my game loop:
class Program
{
static void Main(string[] args)
{
var player = new ...
9
votes
1answer
189 views
Gotta catch 'em all!
This week's challenge is essentially about fetching Json data from the Web, and deserializing it into objects. I don't have much time to devote to this one, so what I have is very basic: it displays ...
10
votes
1answer
127 views
Ruby Sudoku solver
This week's weekend challenge #3 seemed like a great opportunity to learn Ruby! Unfortunately, my workload and looming vacation did not cooperate. :( The puzzle will make forced moves automatically, ...
8
votes
1answer
189 views
Sudoku solver in JavaScript; pencil marks & recursive patience
Here is my attempt to Weekend Challenge #3.
Out of scope:
It only will do 9*9
It will stop at the first solution
Could have been smarter at re-using the cache when recursively calling solveGrid
I ...
15
votes
4answers
269 views
SudokuSharp Solver with advanced features
Even though it's the first time I'm writing something this "big", it feels like I know C# quite good. It's been nice to learn LINQ also and I am very impressed by the features, and perhaps I have ...
7
votes
2answers
80 views
Hello Java World ~> Parsing a Sudoku Grid
This is my first, very-very first attempt at java. I haven't started tackling the actual resolution of the sudoku puzzle (not even sure where to start, haven't looked at other weekend-challenge ...
14
votes
2answers
963 views
Sudoku Solver in C
I had this code lying around, so I figured I would submit this as my first attempt at a weekend-challenge. I would prefer if reviews contained suggestions on how to improve the algorithm, but all ...
8
votes
1answer
160 views
Sudoku Week-End Challenge - Brute-Force Recursive solver
This is part of my attempt at the Week-End Challenge #3. The overall problem is larger than will fit in one question. This is a well-contained subset of my larger program.
The goal of this part is to ...
14
votes
2answers
206 views
Sudoku using exact cover solver
1. Introduction
This is a solution to Weekend Challenge #3: a Sudoku solver in Python. It works by translating a Sudoku puzzle into an exact cover problem, and then solving the exact cover problem ...
8
votes
2answers
184 views
Python sudoku solver using simple deductions and brute-force guessing
Here's my attempt at Weekend Challenge #3.
Key characteristics of this Python entry are:
The strategy is to alternate between "autocomplete" (making simple deductions such as naked singles and ...
12
votes
1answer
249 views
Weekend Challenge: Ruby Poker Hand Evaluation
I'm late to this weekend challenge (sorry), but since it's all in good fun, I hope that's ok. I'm no poker player, though, so I may have completely overlooked something.
The Hand class does the ...
9
votes
1answer
122 views
isStraight evaluation function
The context is Weekend Challenge #2 (Poker hand evaluation).
Hand.prototype.isStraight = function()
{
for( var i = 1 ; i < this.cards.length ; i++ )
if( this.cards[i].value + 1 != ...
9
votes
1answer
141 views
Weekend Challenge - Poker Hand Evaluation
Weekend Challenge #2 - Poker Hand Evaluation
Very early I decided to support the usage of wild jokers, even though I knew that this was going to lead to trouble more work. I also wanted to support ...
6
votes
1answer
182 views
Poker Hand Evaluation - Finding a straight
Weekend Challenge #2 - Poker Hand Evaluation
Finding a straight with wildcards
Because of a size limit on Code Review I have to split my weekly challenge result in two, and here is a part where I ...
8
votes
1answer
138 views
Poker Hand Evaluator, take 2
This is following up on my previous attempt, which was admittedly done fast and not-so-well. This code attempts to allow comparing two poker hands to determine a winner, not only evaluating a given ...
3
votes
2answers
135 views
Poker Hand Evaluator Challenge
This week's review challenge is a poker hand evaluator. I started by enumerating the possible hands:
public enum PokerHands
{
Pair,
TwoPair,
ThreeOfKind,
Straight,
Flush,
...
8
votes
2answers
205 views
RPSLS Game in C#
I went with what I know and can use well, not what I know and can't figure the syntax out to make it look good.
so please enjoy the code and prepare to school me (probably in the basics) in C#
...
11
votes
2answers
178 views
Rock Paper Scissors Lizard Spock Revisited
Continuing the spirit of the recent Weekend Challenge, here is a revised version of the RPSLS game.
This is a follow up to my previous submission:
Rock Paper Scissors Lizard Spock as a code-style ...
10
votes
2answers
244 views
Rock-Paper-Scissors-Lizard-Spock challenge in C++
Here's my take at the Rock-Paper-Scissors-Lizard-Spock challenge. The outcomes are as follows:
Scissors cuts paper
paper covers rock
rock crushes lizard
lizard poisons Spock
Spock ...
9
votes
2answers
228 views
Rock-Paper-Scissors-Lizard-Spock Challenge, take 2
This post is following-up on Rock-Paper-Scissors-Lizard-Spock Challenge
I had a gut feeling that I was somehow abusing IComparable<T>, @svick's answer confirmed that.
As @dreza was posting his ...
10
votes
2answers
198 views
Another Rock Paper Scissors Lizard Spock implementation
The Challenge
Create an implementation of "Rock - Paper - Scissors - Lizard - Spock".
The rules:
Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes ...
14
votes
4answers
617 views
Rock-Paper-Scissors-Lizard-Spock Challenge
"Scissors cuts paper, paper covers rock,
rock crushes lizard, lizard poisons Spock,
Spock smashes scissors, scissors decapitate lizard,
lizard eats paper, paper ...
11
votes
2answers
284 views
Rock Paper Scissors Lizard Spock as a code-style and challenge
The following is a program that lets a Human play "Rock Paper Scissors Lizard Spock" against the computer... (almost playable at: http://ideone.com/EBDlga)
Note I have posted a follow-up question ...