Snippets tagged Game
Tetris
Playable Tetris mini-game. Use arrow keys to move left and right and up to rotate, down to drop. Try it out in the browser on TryFSharp.org
10 people like this
Posted: 10 months ago by Phillip TrelfordMinesweeper 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.
14 people like this
Posted: 8 months ago by nagat01Times Table game
Simple times table console based game.
2 people like this
Posted: 7 months ago by Phillip TrelfordBaccarat
Shuffles a deck of cards, deals 2 hands applying punto banco rules before declaring a winner or a tie.
4 people like this
Posted: 4 months ago by Phillip Trelford
PacMan Maze
PacMan maze view runnable inside TryFSharp.org
4 people like this
Posted: 4 months ago by Phillip TrelfordPong
Pong video game runnable inside TryFSharp.org. Player 1 keys 'Q' - up, 'A' - down. Player 2 keys 'P' - up, 'L' - down.
5 people like this
Posted: 3 months ago by Phillip TrelfordTicTacToe(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/).
3 people like this
Posted: 3 months ago by nagat01Bayesian Monte Carlo of Let's Make a Deal
This code illustrates Bayes' Theorem in action on the Let's Make a Deal problem, which several authors have used to illustrate Bayes' Theorem. (It's easy to search the internet for further explanation.) Run with the audit option to audit up to the first 100 games. Running without audit is faster and can simulate a couple billion games.
3 people like this
Posted: 1 months ago by Jack Fox