Questions tagged [community-challenge]

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 the [game] tag as well.

Filter by
Sorted by
Tagged with
3 votes
2 answers
908 views

another Tic-Tac-Toe Game

I have a bit of experience in programming but not that much. I was trying to create a TicTacToe Game in Javascript. I was doing my best to have a good structure. I was thinking about using classes, ...
Cats's user avatar
  • 41
1 vote
1 answer
482 views

An implementation of Uber's "Fare Estimator" [CodeSignal]

CodeSignal put out a challenge by Uber that involves writing a "fare estimator" that involves a function dependent on cost per minute, cost per mile, ride time and ride distance. The formula ...
Aleksey's user avatar
  • 173
2 votes
2 answers
155 views

AdventOfCode Day 1 : find X element matching a criteria in haskell

This problem is from https://adventofcode.com/2020/ day 1. I need to find the N entries of inputs that sum to 2020 and then multiply those N numbers together. ...
Martin Morterol's user avatar
-3 votes
2 answers
101 views

'*' present in the print statement-PYTHON [closed]

for i in range(1,int(input())+1): print(((10**i -1)//9)*((10**i -1)//9)) print('lol just need to fill one more line to post the question IGNORE IT') What is ...
Ayush Shukla's user avatar
2 votes
1 answer
72 views

Finding minimum weighted matching in sink source graph

I have three lists of nodes. sources sinks pipes There is a directed weighted graph from sources to pipes to sinks. Sources are only connected to pipes and pipes only to sinks. But sources are not ...
yukashima huksay's user avatar
1 vote
2 answers
319 views

github page/ DHH Score Challenge in ruby

I wrote the following code which when executed prints the score of https://github.com/dhh. ...
Praneetha's user avatar
  • 155
7 votes
3 answers
4k views

Finding the position in a triangle for the given challenge

The LAMBCHOP doomsday device takes up much of the interior of Commander Lambda's space station, and as a result the prison blocks have an unusual layout. They are stacked in a triangular shape, and ...
user40929's user avatar
  • 163
4 votes
0 answers
441 views

Lexer with a parser combinator

A follow up to my previous question which was on the token library that this lexer produces a stream of. View the full project, the tokens library, the parser combinator library, or this lexer ...
CAD97's user avatar
  • 1,944
6 votes
1 answer
4k views

Elevator simulator

I have an elevator simulator. After launching the script it always waits for the user input. The user can press get number, where number is a floor where the passenger is located. Note that one of the ...
Alex Ermolaev's user avatar
4 votes
1 answer
119 views

Language tokens library

This may seem a little small, but it's actually a self-contained crate in my project. This crate contains definitions for the source tokens in the language I'm working on, Nafi. As of current, it's ...
CAD97's user avatar
  • 1,944
22 votes
4 answers
2k views

Complex tokenizer in C#

As we have our Community Oriented Development Extravaganza, Requiring Extreme Vigor Inciting Extraordinary Winners 2017 Challenge. Finally I had some time to write a tokenizer for my own language. It ...
Michał Paszkowski's user avatar
8 votes
3 answers
3k views

Simple language tokenizer in C#

I had some spare time so I have decided to write a simple tokenizer in C# for my own programming language. The tokenizer is not finished, but it is working and I would like to hear your opinion on ...
107MP's user avatar
  • 125
54 votes
1 answer
2k views

Swiftly turning wheels – The May 2017 Community Challenge

This is my attempt at the May 2017 Community Challenge in Swift, with a chain consisting of rigid links. I took this as an opportunity to learn SpriteKit, Apple's framework for 2D games. At least ...
Martin R's user avatar
  • 23.2k
8 votes
1 answer
223 views

Safe Intersections

Code Review's April 2017 Community Challenge has us simulating a multi-way intersection. My emphasis was around safety (don't want cars crashing) and ease of use. I plan on adding "smart intersections"...
Justin's user avatar
  • 3,295
9 votes
2 answers
407 views

Rock, Paper, Whatever - A small commandline game

My rational for this program, was to learn more of Python's standard library, I didn't actually know cmd was even in it until I started this program. It's also the ...
Peilonrayz's user avatar
  • 43.3k
7 votes
1 answer
1k views

2 Player Battleship with Multiple Ships

This is it. My best game, a fully functional, 2 player game of battleship. My coordinate picker can be seen here. I didn't make all the changes they wanted. I would prefer some insight on whether I ...
lol's user avatar
  • 243
3 votes
2 answers
110 views

Taking change - convergent iteration through iterate

For the Code Review community challenge "Implement StackSTV", the algorithm requires a "convergent iterative scheme" to calculate the keep ratios of candidates that have been elected. To simplify the ...
Vogel612's user avatar
  • 25.2k
10 votes
2 answers
398 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 ...
user avatar
6 votes
1 answer
143 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. ...
I'll add comments tomorrow's user avatar
5 votes
1 answer
213 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 ...
Justin's user avatar
  • 3,295
20 votes
1 answer
298 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 ...
Dan Oberlam's user avatar
  • 7,804
22 votes
1 answer
356 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 ...
Martin R's user avatar
  • 23.2k
24 votes
4 answers
479 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. ...
N3buchadnezzar's user avatar
12 votes
1 answer
249 views

Rainfall Challenge (August 2016 Community Challenge)

My solution for the Rainfall Challenge (August 2016 Community Challenge). Error handling was intentionally ignored. Cell.cs ...
JanDotNet's user avatar
  • 8,538
8 votes
1 answer
124 views

Trials, tribulations, and tributaries (Rainfall challenge)

This is a fairly simple Ruby solution to the August 2016 community challenge. Ok, the title is way too dramatic. But tributary is a nice word, and the alliteration was too good to pass up. Besides, ...
Flambino's user avatar
  • 33k
11 votes
1 answer
153 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 ...
konijn's user avatar
  • 33.2k
10 votes
2 answers
439 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 ...
mdfst13's user avatar
  • 21.6k
12 votes
1 answer
789 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 ...
Edward's user avatar
  • 66.4k
16 votes
1 answer
313 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 ...
Phrancis's user avatar
  • 20.4k
8 votes
1 answer
357 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 ...
josliber's user avatar
  • 1,181
12 votes
2 answers
499 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 ...
Michael Brandon Morris's user avatar
17 votes
1 answer
1k 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. ...
Josh Kirkpatrick's user avatar
13 votes
2 answers
466 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, ...
Vogel612's user avatar
  • 25.2k
20 votes
4 answers
1k 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 ...
Legato's user avatar
  • 9,829
9 votes
2 answers
2k 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. ...
James Fenwick's user avatar
12 votes
0 answers
200 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 ...
Justin's user avatar
  • 3,295
20 votes
1 answer
1k 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-...
Mast's user avatar
  • 13.4k
9 votes
1 answer
7k 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 ...
SuperBiasedMan's user avatar
3 votes
1 answer
303 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 ...
jean's user avatar
  • 248
6 votes
2 answers
566 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: ...
Ismael Miguel's user avatar
14 votes
1 answer
1k 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 ...
Mast's user avatar
  • 13.4k
24 votes
6 answers
5k 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 ...
Daria M's user avatar
  • 451
10 votes
2 answers
132 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 ...
Bruno's user avatar
  • 582
12 votes
1 answer
1k 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 ...
erichamion's user avatar
12 votes
1 answer
4k 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 ...
erichamion's user avatar
12 votes
2 answers
4k 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 ...
Legato's user avatar
  • 9,829
27 votes
3 answers
1k 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 ...
Raystafarian's user avatar
  • 7,139
25 votes
1 answer
488 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 ...
Simon Forsberg's user avatar
14 votes
2 answers
214 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 ...
maaartinus's user avatar
  • 13.5k
11 votes
1 answer
563 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 (...
maaartinus's user avatar
  • 13.5k