namespace prisonEscape    module Items =            open DataModel                let lockpick: Item =            { Information =                { Name = “Lockpick”                  Description = “It is a lockpick.”} }        let screwdriver: Item =            { Information =                { Name = “Screwdriver”                  Description = “It is a screwdriver.”} }        let wireCutters: Item =            { Information =                { Name = “Wire Cutters”                  Description = “It is wire cutters.”} }        let keycard: Item =            { Information =                { Name = “Keycard”                  Description = “It is a keycard.”} }                   let tapeRecorder: Item =            { Information =                { Name = “Tape Recorder”                  Description = “It is a tape recorder.”} }    namespace prisonEscape    module Progam =        open System        open Levels        open Messages        open DataModel                        let quit () =            Messages.goodbye()            false                                        let main argv =             Messages.hello()            Console.ReadLine() |> ignore            0            namespace prisonEscape    module Levels =                 open DataModel        open Items                let firstLevel: Level = {             Id = LevelID(“Cell 8”)            Information =                { Name = “Cell 8”                  Description = “A dimly lit prison cell, the door is locked but the wall appears to be damaged.” }            Items =             Exits =                { North = NoExit None;                  East = NoExit None;                  South = NoExit None;                  West = ValidExit(“The damaged wall leads into the adjacent cell.”, LevelID “Cell 7”) }                  }        let secondLevel: Level = {             Id = LevelID(“Cell 7”)            Information =                { Name = “Cell 7”                  Description = “A dimly lit prison cell, the door is locked but the wall appears to be damaged. There is something in the corner, pick it up!” }            Items = lockpick            Exits =                { North = InvalidExit(“The door is locked.”, lockpick, ValidExit (“The cell door opens into a dark hallway, you can hear noises in the distance.”, LevelID “Hallway”))                  South = NoExit None                  East = NoExit None                  West = NoExit None}                  }        let thirdLevel: Level = {             Id = LevelID(“cellsHallway”)            Information =                 { Name = “Cells Hallway”                  Description = “You emerge into a dark hallway, the guard is asleep! You can see his keycard! It must unlock that door!” }            Items =             Exits =                             { North = NoExit None                  East = NoExit None                  South = NoExit None                  West = InvalidExit (“There is a security door with an access point. A sign above the door reads ‘AUTHORISED PERSONNEL ONLY’ “, keycard, ValidExit (“The security door opens into another hallway.”, LevelID “securityHallway”)) }        }        //Add rest of rooms + items + exits                           namespace prisonEscape    module Messages =        open DataModel        open Items                    let hello () =             printfn “Hello player, you are a special operative for a Super Massive Attack Control Krew (SMACK) called The Unessentials.
Unfortunately you have been captured by Aiden The Enemy and his army of Reds.
You find yourself in his prison complex and must use your cunning and wit (and things you find lying around to escape.
But not before stealing the valuable piece of intelligence you know is stashed away on the bottom floor of the prison.

Good Luck.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

Type ‘Play’ to proceed, or ‘Quit’ to leave the game.”                    let goodbye () =             printfn “Good bye! Play again another time!”        let win () =            printfn “You have escaped the prison, congratulations!”        let lose () =            printfn “You have failed to escape the prison, better luck next time!”        let pickup (item:Item) =            printfn “You pickup the %s” item.Information.Name                   namespace prisonEscape    module DataModel =        type Information =             { Name: string;              Description: string; }        type Item =            { Information: Information; }        type LevelID =            | LevelID of string          type Exit =            | ValidExit of string * destination: LevelID            | InvalidExit of string * key: Item * nextLevel: Exit            | NoExit of string option        type Exits =            { North: Exit              East: Exit              South: Exit              West: Exit }        type Level =             { Id: LevelID              Information: Information              Items: Item list              Exits: Exits }                type Player =             { Information: Information              Location: LevelID              Inventory: Item list}        type World =            { Levels: Map              Player: Player }