Snippets tagged game

  • Minesweeper in 99 lines of code

    This program is written in only 99 lines of actual code and remains enough readability. I used few short-coding technics. 1. no XAML. 2. pre-calculate every useful data for the purpose of eliminating useless states 3. using record type with set property as an alternative of view-model 4. initialize everything in one place. 5. encapsulate all states in one place.

    16 people like this

    Posted: 10 years ago by nagat01

  • Baccarat

    Shuffles a deck of cards, deals 2 hands applying punto banco rules before declaring a winner or a tie.

    4 people like this

    Posted: 9 years ago by Phillip Trelford

  • TicTacToe(Joinads Example)

    TicTacToe game simulator implemented by using Joinads(http://tomasp.net/blog/joinads-async-prog.aspx). Game logic in this snippet was simplified so nicely by using Joinads. You can run this snippet on Try Joinads (http://tryjoinads.org/).

    4 people like this

    Posted: 9 years ago by nagat01

  • Berzerk

    Zombie state machine code sample. Use arrow keys to move humanoid. Robots activate when in range of humanoids. Try it out in the browser with TryFSharp.org.

    6 people like this

    Posted: 9 years ago by Phillip Trelford

  • Minesweeper Kata 2

    Solution to Minesweeper Kata second challenge at Goto Copenhagen 2012 conference "Programming with the Stars" track. Runnable at http://tryfsharp.org.

    2 people like this

    Posted: 9 years ago by Phillip Trelford

  • Game of Life

    Simple implementation of Conway's Game of Life for the TryF# web site.

    0 people like this

    Posted: 9 years ago by Tomas Petricek

  • Game of Life

    Conway's Game of Life example at F#unctional Londoners July 2012 meetup.

    2 people like this

    Posted: 9 years ago by Phillip Trelford

  • Reversi Kata solution

    Reversi Kata solution from February 2013 London F# Meetup Coding Kata.

    5 people like this

    Posted: 8 years ago by Phillip Trelford

  • Missile Command script (WPF)

    WPF version of Missile Command. Run as a script in Visual Studio or create a new application project, reference the assemblies listed at the top of the script and paste the code over Program.fs and hit F5.

    8 people like this

    Posted: 8 years ago by Phillip Trelford

  • Game of 2048

    Simple implementation of the popular game "2048". Can you add up the tiles and reach 2048? The game can be played in fsi or you can add the GUI which is so far missing.

    7 people like this

    Posted: 7 years ago by Tore Green

  • Game Evolution

    Game evolution

    0 people like this

    Posted: 6 years ago by Paul Orland

  • Flappy Bird clone using WPF

    Flappy bird clone script using WPF, click the mouse or hit space to flap, no collision detection.

    6 people like this

    Posted: 6 years ago by Phillip Trelford

  • Doms Guess Game

    My Game in F#, creates the five times table up to 100 and then selects a random number from it. You then guess the number

    1 people like this

    Posted: 6 years ago by Dom Finn

  • kRPC example (Kerbal Space Program)

    When running the kRPC Remote Procedure Call Server in a Kerbal Space Program game the kRPC C# Client can be accessed from within F# Interactive in Visual Studio. Learn more about the game here http://www.kerbalspaceprogram.com. Official kRPC C# Client documentation can be found here http://djungelorm.github.io/krpc/docs/csharp/client.html. Note: This snippet was (re-)uploaded because the original (http://fssnip.net/8qR) went lost.

    2 people like this

    Posted: 5 years ago by Robert Nielsen

  • A CONSOLE-BASED ROCK-PAPER-SCISSORS

    When playing rock-paper-scissors (RPS), we show 0 fingers for rock, 2 for scissors and 5 for paper. This rule is also applied for this console-based game written in F#. Enjoy !

    0 people like this

    Posted: 1 year ago by me

  • A Monty Hall problem simulator

    I'm bad at math and writing this code down helped me to understand what's up with this counter intuitive problem.

    4 people like this

    Posted: 8 months ago by Julien Di Lenarda