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. Typically you should also tag community-challenge questions with [tag:game] as well.
11
votes
2answers
145 views
You can't sink me
Here is a Battlehips game in F#. Now, before you start jumping up and down on my code, please understand that, for all its awesomeness, F# has a serious limitation: Its compilation is linear, and the ...
6
votes
1answer
109 views
Tomorrow: rainy with a chance of null objects
In an attempt to hide from the sun outside, I gave the community challenge "Rainfall" a try.
Code here, specific questions below.
...
4
votes
1answer
51 views
Rusted Mandelbrot
As my go to first project for a language is a Mandelbrot, I had to implement one in Rust. I'm particularly annoyed by invalid_arg_count, as I feel like there has to ...
16
votes
1answer
198 views
Rainfall - August 2016 Community Challenge (Hooray for graphs!)
A solution for the August 2016 Community Challenge (Rainfall).
I've intentionally left out error checking on the file formatting.
This seems like a very obvious graph problem to me - we want to ...
8
votes
0answers
109 views
Water flowing swiftly over farmland – The August 2016 Community Challenge
This is my attempt to solve the August 2016 Community Challenge in Swift. I tried to implement the algorithm
described by @200_success:
Each Cell keeps track ...
19
votes
4answers
333 views
When it rains, it pours - August 2016 Community Challenge
1. Introduction
This code is my attempt at solving the August 2016 Community Challenge. Coming from a city where it rains cats and dogs on a daily basis this challenge was right up my alley =)
2. ...
12
votes
1answer
154 views
Rainfall Challenge (August 2016 Community Challenge)
My solution for the Rainfall Challenge (August 2016 Community Challenge).
Error handling was intentionally ignored.
Cell.cs
...
7
votes
1answer
97 views
Trials, tribulations, and tributaries (Rainfall challenge)
Ok, the title is way too dramatic. But tributary is a nice word, and the alliteration was too good to pass up.
Besides, konijn started it!
This is a fairly simple Ruby solution to the August 2016 ...
11
votes
1answer
124 views
Wandering water ways
An entry for the August 2016 Community Challenge
I slightly modified the input and output to suit the snippet tool, and also because I really like the mapped output with the basins.
I have been ...
8
votes
2answers
105 views
Rainfall challenge: how big are the basins?
August 2016 challenge
The Rainfall Challenge
Problem description is copied verbatim from the linked Code Review
question:
Problem Statement
A group of farmers has some ...
12
votes
1answer
143 views
Sketch of Chutes and Ladders game
The classic Chutes and Ladders game has a grid of 100 squares with various "chutes" (which send a player backwards) and "ladders" (which promote a player forward). The goal here was to randomly ...
10
votes
0answers
77 views
Parameterized Chutes & Ladders simulator using SQL stored procedure
I thought this would be a fun exercise to use SQL to participate in the June 2016 Community Challenge, so I did. Yes, you may call me crazy!
I had to write a few little things to help me, I needed a ...
8
votes
1answer
114 views
Random Chutes and Ladders Board Generator (June 2016 Community Challenge)
This is my submission for the June 2016 Community Challenge. It is R code that takes as input the number of squares on the board, the desired number of chutes and ladders, and the desired total sum of ...
11
votes
2answers
153 views
Chutes & Ladders Board Generator (June 2016 Community Challenge)
This is an "entry" I made for the June 2016 Community Challenge to make a Chutes and Ladders generator. It generates a random number of chutes and ladders with a total delta of -50 and displays their ...
15
votes
1answer
204 views
Arduino Snakes and Ladders
Here is a snakes and ladders game I made using an Arduino using a serial terminal, a set of addressable LED's to create a physical game board, a 7 segment display, and a piezoelectric to create sound.
...
11
votes
2answers
428 views
Resistance is futile, Resistors have been dispatched to model your Resistance
Since it was getting boring to always do OOP Languages I decided to dabble in the functional realm of programming.
For that I chose the narrowly missed community-challenge by Edward: Resistor Mania, ...
17
votes
4answers
782 views
Simon Says: is this too complex?
I took a class covering HTML, CSS, Javascript and for a final project, thinking of a previous community challenge, I created Simon Says.
Going through my code my professor deemed it overly ...
1
vote
0answers
522 views
“Partial solution” on Code Eval for Clojure FizzBuzz
I'm just getting started on the site CodeEval, and I submitted my first solution today. What I don't understand is why it's marking my (working) answer as only a "partial solution". The site doesn't ...
7
votes
2answers
355 views
Mandelbrot Set Fractal
I thought I would give this months community challenge a try. This is my first time using Python.
It does take quite a while to run and it's not very colourful but it works.
...
7
votes
0answers
96 views
Multithreaded Groovy Mandelbrot
Seeing as it's October, I thought I'd do the community challenge. Due to my inexperience coding in Groovy, I decided to give Groovy a go. I'm not sure how well I followed Groovy conventions, and the ...
16
votes
1answer
719 views
Messed up Elevator Management System
In light of our current community-challenge I decided to build an Elevator Management System.
Initially I intended to program the EMS like a real-time operating system and the elevators as finite-...
8
votes
1answer
637 views
Elevator Management System
So here's my attempt at the September community challenge, making an elevator handling system. I'm not really very familiar with OOP, so I'm particularly looking to get feedback on that part of the ...
3
votes
1answer
90 views
Rock, Paper, Scissors, Lizard and Spock - Relational Paradigm
I found a few question about the game and IMHO it's a relational problem and better addressed by set logic. Thus I created this solution in SQL to get away from ugly JavaScript, elegant java and ...
6
votes
2answers
222 views
Rock, Paper, Scissors, Lizard and Spock with OOP
Today I saw an extremely interesting question on the Rock, Paper, Scissors, Lizard and Spock game. I've decided to take my swing at it and I've written the following OOP implementation:
...
13
votes
1answer
182 views
Racetrack plotter
My Racetrack is just that. A Racetrack. You can't race it (yet) because I had trouble with collision detection, but I wanted to share it anyway.
It creates a base polygon by using ...
19
votes
6answers
4k views
Rock, Paper, Scissors, Lizard and Spock
I am currently done with this little Rock, Paper, Scissors, Lizard, Spock game in JavaScript. The game is working fine, but I am not pleased with the code. Is there a way to refactor these ...
9
votes
2answers
81 views
Racetrack game with reading the track from a file
For this community challenge I made the racetrack game. I'm reading the race data from a text file, which is available here. This is only playable by entering the velocity at the console.
I've got ...
12
votes
1answer
265 views
Racetrack pathfinding and path following
Racetrack
The August community challenge is to implement a program that plays the Racetrack game. Each player starts with an integer position on a square grid. On each turn, the current player can ...
12
votes
1answer
427 views
Racetrack in Java
Racetrack:
The August community challenge is to implement a program that plays the Racetrack game. Each player starts with an integer position on a square grid. On each turn, the current player can ...
12
votes
1answer
485 views
Ultimate Tic Tac Toe A.K.A. Tic Tactics
My attempt at this challenge., incorporating lessons from this question, which turned out into a much bigger project than I anticipated, but it works. I'll definitely be refactoring most of this in ...
21
votes
3answers
393 views
Racetrack in… VBA?
So, I took a look at the August Challenge:
The top-voted answer is
Racetrack1:
"In the game of
Racetrack2, cars race
around a track bounded by two concentric closed loops drawn on a
...
21
votes
1answer
380 views
A Groovy Election
Implementing the July 2015 Community Challenge seemed relevant considering it is election time.
I decided to go with the strategy pattern as this can be implemented in many different ways. I did my ...
14
votes
2answers
165 views
Ultimatoe — 2. The model
The game model (Ultimatoe) consists of 9 instances of Tic-Tac-Toe (UltimatoeBoard) and some auxiliary information. As the number ...
11
votes
1answer
289 views
Ultimatoe — 1. GUI and general game interfaces
For the community challenge, I wrote ultimatoe. For me, the most interesting part is clearly the AI, but what I did so far is just a stupid Monte Carlo tree search, which isn't ready for a review yet (...
11
votes
1answer
1k views
Decrypting a substitution cipher using n-gram frequency analysis
This is a solution for the June 2015 Community Challenge: a program that decrypts a monoalphabetic substitution cipher. It's written in Python 3, but should be portable to Python 2 if you use ...
5
votes
1answer
611 views
Monoalphabetic Substitution Cipher
In light of this months Community Challenge, I've taken a stab at building something related. Keep in mind, this isn't a submission for the challenge, just a utility to help in the later process of ...
12
votes
1answer
219 views
A Smarter random bomber for Battleship
In a further exercise of my original Battleship test framework, I have enhanced and refactored the SmartRandom class from an earlier question and have updated ...
7
votes
2answers
608 views
A (late) Simple Calculator
As I was looking through my past questions, I noticed my really old calculator question (here and here). Considering it looked like a huge mess, I decided to rewrite it. Coincidentally, the April 2015 ...
7
votes
1answer
149 views
SmartRandom bombing strategy for Battleship game
Now that I have some infrastructure in place to test it (see my Battleship test framework and the updated GitHub project for the full context), I have finally written a non-trivial bombing strategy ...
15
votes
1answer
876 views
Battleship strategy evaluation framework
In preparation for the May 2015 Community Challenge, I decided to build a Battleship strategy tester.
Implementing an ocean
First, there is an underlying Ocean ...
16
votes
2answers
376 views
Battleship Challenge: Naval Build-up
The community challenge for this month says:
Everyone has played Battleship. Let's implement the logic that sinks one.
But that presumes that there's something to sink. We can't have the armada ...
7
votes
1answer
174 views
Calculator implementation
With some background and experience in PHP & Python, I'm trying to learn Swift by myself (web, videos, Ray Wenderlich books). I've read that a good first project for beginners is to try and write ...
3
votes
2answers
759 views
Permutation and combination calculator
I wanted to make something for the Community Challenge, so I made a simple permutation and combination calculator. I'd like input on:
The overall design - any suboptimal choices that could be ...
7
votes
3answers
699 views
First 4-function Swing calculator
This is for a high school class I'm taking. Any tips/improvements?
...
17
votes
2answers
376 views
Newborn pythonic calculator
Let me start off by saying that I have several years of experience in Java, but now I need to learn Python, so I decided to make a calculator as it also is a community challenge.
Please review the ...
12
votes
1answer
226 views
Yet Another Java CLI Calculator
In the spirit of April 2015 Community Challenge, I have created two Java-based calculators with the following codebase layout:
An interface Calculeightor for ...
10
votes
2answers
312 views
Yet Another Java GUI Calculator
In the spirit of April 2015 Community Challenge, I have created two Java-based calculators with the following codebase layout:
An interface Calculeightor for ...
11
votes
3answers
950 views
CC C# calculator
This is my basic C# calculator; I'm sure there is much that can be improved. This design is based on Bjarne Stroustrup's C++ calculator, a purposely be-bugged version of which can be found at his ...
11
votes
3answers
3k views
Hello There Calculator
The open source project I work on uses Antlr4 pretty heavily, but I don't know much about it. I thought I would use April's Community Challenge as an opportunity to learn something about grammars, ...
10
votes
2answers
4k views
Binary Calculator in Java
I'm a beginner in Java and I tried to create a program that will perform basic arithmetic operations on binary numbers.
BinaryOperations class:
...