Skip to main content

All Questions

3 votes
0 answers
266 views

Command line wordle

I am seeking a review of my command line wordle game. Having only recently started exploring functional programming, I expect that there will be no shortage of areas to improve. This is my first ...
Adam Hodgson's user avatar
10 votes
3 answers
764 views

JavaScript OOD: 2048

I wrote a 2048 game in JavaScript with an object-oriented paradigm. The game board is presented with a two-dimensional array and each tile holds an integer. Here is the implementation: ...
Joji's user avatar
  • 325
3 votes
2 answers
655 views

Python word guessing game

...
Rabeea Rehman's user avatar
4 votes
1 answer
220 views

A library of 2D Shapes with functions for their intersections

The goal was as much code reuse as I could get. Shooting for a pure-function-y style. Would love any feedback on general architecture, adherence to standard practice and usability - as well as ideas ...
Ty Miles's user avatar
  • 185
-2 votes
1 answer
66 views

A game that deals a high card to one of two players [closed]

So for my class, I have to design a game that will deal out one card to for each player. I also need to use functions to accomplish this one for the high card game, and another for the face value of ...
SIth_Lord_85's user avatar
8 votes
3 answers
539 views

Story-based adventure with functions and relationships

This is a story-based adventure program I coded by myself (forgive the length). It took a long time but it was fun. It includes loading times, changes in relationships, relationship levels, storyline ...
notak's user avatar
  • 605
7 votes
1 answer
208 views

Avoid incoming meteors

I'm visiting a functional programming course at my university which has a small project for examination. The language we are using is clojure and the contents of the lecture have mostly been about it'...
Niklas's user avatar
  • 73
4 votes
0 answers
64 views

Time travelling through state history with persistent consequences

I am working on a game written in Kotlin that has a state management system similar to Redux. The state of the game is kept in a single place and is represented as immutable data classes (no logic). ...
Sean Dawson's user avatar
9 votes
1 answer
1k views

Cookie Clicker Switches

In Cookie Clicker there are Golden cookies, and Wrath Golden Cookies. Golden cookies are Clickable cookies that randomly appear, and when clicked they give Bonus cookies, or temporary boosts to ...
Malachi's user avatar
  • 28.8k
4 votes
2 answers
2k views

Wrath Cookie Switch for Auto Golden Cookie Clicker

Sometimes you feel like a wrath cookie and sometimes you don't. Here is a function that I created that will run on an interval, so all I have to do is set a boolean when I want to switch between ...
Malachi's user avatar
  • 28.8k
11 votes
1 answer
505 views

American Checkers

I am implementing the logic for a Checkers game in F#. I am writing my code in a library so it can be called from any UI provider, and am trying to do it in good FP style. I currently have the ...
user avatar
14 votes
1 answer
612 views

Grand Chess domain model and helper functions

So I am trying to write, essentially from a blank slate, a program that plays Grand Chess. In short, it is a chess variant that is played with two extra pieces, on a 10x10 board, no castling, and ...
asibahi's user avatar
  • 927
5 votes
1 answer
2k views

Battleship Game

Inspired by this question, I went on with the following version. My goal was to focus on pure functions, to avoid mutable variables and to be strictly functional. I have ignored the computer player ...
user avatar
10 votes
2 answers
417 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
10 votes
1 answer
991 views

Small game written in F#

I'm trying to wrap my head around F#. I'd like your honest opinion about this simple game source code that I wrote. Rules are simple: Every player has soldiers and territory Player can recruit ...
Twelve's user avatar
  • 203

15 30 50 per page