This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MS7P9OdoxyDj7zcVD2CBB28V91gBB1DqKuTr73gucGc8daGca8ck2C38kdaImcMMkq9dmbbbbbaaaaaabGcaGcaGci8ckzgfKzSBQlCn72M8daGcEbGc6bGc6uGc6pGcFL7bGc6cGcfGca8cm2C38kdaIm9uRldaFbIcGcFDNEY8ei8dbGcaGcaGcaGcaAbdbgsCvQtgfDfFcelAzeqMc7dGcaGcaGca9b66Xjaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PixelVisionSDK.Engine; | |
using PixelVisionSDK.Engine.Chips.Game; | |
using System; | |
using System.Linq; | |
namespace PixelVisionSDK.Extensions | |
{ | |
public static class EngineExtensionMethods | |
{ | |
public static void LoadExtendedGameChip<T>(this IEngine engine, T gameChip) where T:GameChip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using SDL2; | |
using PixelVisionSDK.Engine; | |
using PixelVisionSDK.Engine.Chips.Graphics.Sprites; | |
using PixelVisionSDK.Engine.Chips.Graphics.Colors; | |
using PixelVisionSDK.Engine.Chips.Graphics.Display; | |
using PixelVisionSDK.Engine.Chips.IO.Controller; | |
using PixelVisionSDK.Engine.Chips.Game; | |
using PixelVisionSDK.Engine.Utils; | |
using System.Runtime.InteropServices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Microsoft.SmallBasic.Library | |
//Guess My Number | |
//1. Computer picks a number between 1 and 100 | |
//2. Player makes a guess | |
//3. Computer tells player if guess was too high or too low | |
//4. If the guess is not correct, go back to 2 | |
//5. When the guess is correct, report how many guesses it took. | |
type GameState = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Country = string | |
type Chart = Set<Country*Country> | |
type Colour = Set<Country> | |
type Colouring = Set<Colour> | |
let areNeighbours (chart:Chart) (firstCountry:Country) (secondCountry:Country) :bool = | |
chart.Contains((firstCountry,secondCountry)) || chart.Contains((secondCountry,firstCountry)) | |
let canBeExtBy (chart:Chart) (colour:Colour) (country:Country) :bool = | |
colour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyGame | |
open Microsoft.Xna.Framework | |
open Microsoft.Xna.Framework.Graphics | |
type MyGame () as this = | |
inherit Game() | |
let graphics = new GraphicsDeviceManager(this) | |
let mutable spriteBatch: SpriteBatch = null | |
override this.Initialize() = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cardinal | |
open Location | |
type Direction = North | East | South | West | |
let Walk (location:Location) (direction:Direction) : Location = | |
match direction with | |
| North -> {location with Row=location.Row-1} | |
| East -> {location with Column=location.Column+1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Direction = North | East | South | West | |
let DirectionDelta = function | |
| North -> 0, -1 | |
| East -> 1, 0 | |
| South -> 0, 1 | |
| West -> -1, 0 | |
let DirectionOpposite = function | |
| North -> South |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Linq; | |
using System.Reflection; | |
using System.Windows.Forms; | |
namespace csharpversion | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let exampleLevel = [" #####"; | |
" # #"; | |
" #$ #"; | |
" ### $##"; | |
" # $ $ #"; | |
"### # ## # ######"; | |
"# # ## ##### ..#"; | |
"# $ $ ..#"; | |
"##### ### #@## ..#"; | |
" # #########"; |
NewerOlder