Giter Site home page Giter Site logo

ndrsllwngr / ffp Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 2.62 MB

Minesweepskell - a fun(ctional) Web Minesweeper written in Haskell. Advanced Functional Programming - Group project (2020)

Home Page: https://www.tcs.ifi.lmu.de/lehre/ss-2020/fun

Emacs Lisp 0.31% Haskell 99.69%
haskell yesod tailwind minesweeper

ffp's Introduction

Hi 👋

fn main() {
    let me = SoftwareEngineer {
        name: "Andreas Ellwanger",
        role: "Software Engineer",
        company: "Celonis",
        languages: Vec::from(["de_DE", "en_US"])
    };
    me.say_hi();
}

#[allow(dead_code)]
struct SoftwareEngineer<'a> {
    name: &'a str,
    role: &'a str,
    company: &'a str,
    languages: Vec<&'a str>
}

impl SoftwareEngineer<'_> {
    fn say_hi(&self) {
        println!("Thanks for dropping by, hope you find some of my work interesting. ~{}", self.name);
    }
}

ffp's People

Contributors

griase94 avatar ndrsllwngr avatar tmrdlt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ffp's Issues

Switch db to mongo

TODO
  • Apply changes of stack new minesweepskell yesodweb/mongo to our current project
  • Update github workflow
  • rm postgres from package.yml

fyi

  • run stack build after checking out these changes
INFO

Diff between mongo and postgres

$ diff -qr ffp test/minesweepskell --exclude=".stack-work" --exclude=".*" | sort
TODO
Files ffp/src/Application.hs and test/minesweepskell/src/Application.hs differ
Files ffp/test/TestImport.hs and test/minesweepskell/test/TestImport.hs differ
DONE
Files ffp/templates/default-layout.hamlet and test/minesweepskell/templates/default-layout.hamlet differ
Files ffp/templates/homepage.hamlet and test/minesweepskell/templates/homepage.hamlet differ
Files ffp/test/Handler/CommentSpec.hs and test/minesweepskell/test/Handler/CommentSpec.hs differ
Files ffp/src/Settings.hs and test/minesweepskell/src/Settings.hs differ
Files ffp/src/Model.hs and test/minesweepskell/src/Model.hs differ
Files ffp/src/Handler/Home.hs and test/minesweepskell/src/Handler/Home.hs differ
Files ffp/src/Handler/Comment.hs and test/minesweepskell/src/Handler/Comment.hs differ
Files ffp/src/Foundation.hs and test/minesweepskell/src/Foundation.hs differ

Files ffp/stack.yaml and test/minesweepskell/stack.yaml differ
Files ffp/stack.yaml.lock and test/minesweepskell/stack.yaml.lock differ
Files ffp/minesweepskell.cabal and test/minesweepskell/minesweepskell.cabal differ
Files ffp/package.yaml and test/minesweepskell/package.yaml differ
Files ffp/config/settings.yml and test/minesweepskell/config/settings.yml differ
Files ffp/config/test-settings.yml and test/minesweepskell/config/test-settings.yml differ

Only in ffp/config: client_session_key.aes

Only in ffp/static: tmp

Only in ffp: minesweepskell.iml
Only in ffp: yesod-devel

Files ffp/README.md and test/minesweepskell/README.md differ
Only in ffp: README-yesodweb-postgres.md

Only in ffp/config: models.persistentmodels
Only in ffp/config: routes.yesodroutes
Only in test/minesweepskell/config: models
Only in test/minesweepskell/config: routes

Notes / Resources

Further ToDos

SPRINT GOAL ♦️
  • Apply lenses to Data.matrix #28
  • Use actual randomSeed (either via user input or generated) #29
  • Add ServerSideEvents [Tfoo, Chan] to update UI instantly 🗼 #31
  • Human Readable unique GameID generieren (like HarmfulExpectationsCeaseParticularly) @timunkulus
  • Generate games of predefined sizes / difficulty ⚡️
  • Rework user interface (minimal and clean design language, remove boilerplate) #30 @ndrsllwngr @timunkulus
    • Render digits using Attributes to remove flickering
    • Add game instructions (controls)
    • Go Back & Pause Button is just one
    • Completed game history in colors
  • BUG: It should be possible to put only as many flags as totally available @griase94
  • BUG: Show elapsed time of finished games @timunkulus
  • BUG: Pause a game that has no move yet will cause timeElapsed to be already counted @timunkulus
  • On reset finished game: leave game in DB and create new gameID @griase94
  • Update README.md (incl. usage, topics and short description) and align with lecture topics 🔺 #17 (comment)
  • Refactor project, cleanup code, align routes, give variables suitable names [86bae6f]
  • Format files with linter (e.g. stylish-haskell -r -i src/*), be careful that {-# LANGUAGE are preserved
  • Test project
    • game logic
    • moves
    • interactions & routing
    • warnings
BACKEND
  • Don't allow flagging of already revealed cells
  • Error Handling in Requests und Logik (z.b. outOfBound) ❓
FRONTEND
  • Landing page: Show total time of each game which is in final state (lost/won)
OPTIONAL
BUGS
  • Performance Issues ❓
NOT DOING
  • host project on heroku (https://github.com/mfine/heroku-buildpack-stack)
  • UI - implement right-click instead of alt+left-click to flag a cell
  • UI - add pressed state to unrevealed cell & face status
  • Leaderboard (sorted by time, grouped by size+difficulty) would be possible, if we would allow players to enter username (similar to retro game machines)
  • Add unit-tests
  • Error handling on route responses (e.g. show not found page)
  • Make use of advanced monads
  • Game page: Show move history on /game/#id page (🤔 not sure if useful at all. any information gain?)

DONE
  • View updated sich nach Move 32febbe
  • Bomben durchstreichen wenn angeklickt und danach Spiel abschließen d0b3c7d
  • Reveal All wenn alle Bomben geflaggt wurden d0b3c7d
  • Spiel vorzeitig abschließbar machen können (Related #15)
  • Zeit reinbringen und anzeigen
  • Reset Route and action in front end
  • Add reveal all button (makeMove)
  • Stop timer if final state of game 10f2a25
  • add face button in the middle with different emotions
  • Pause Game Funktion (führt zu Startseite zurück)
  • Reveal all button
  • Anzahl an übrigen Flags anzeigen bc8684e
  • Spiel in Datenbank als nur ein Eintrag abspeichern ed7b3d2
  • Game Logik anpassen: Spiel ist erst gewonnen, wenn alle Flags verteilt wurden!
  • localhost is hardcoded at the moment, better solution? b2ac90b
  • Landing page: List all paused/ongoing games which are in the DB 2ee7cc3
  • Lift state and only save paused or finished games in db #27
  • Make use of lenses #25
  • Make use of TVars #27
  • Warnings Fixen [cb3c361, #26 ]

REQUIREMENTS (Uni2Work)
  1. Webapplikation mit yesod
  2. Monaden

Fortgeschrittenere Themen, welche sich zu Monaden anrechnen lassen sind z.B. Monad-Transformer, Lifting, fortgeschrittene Verwendungen von Zustandsmonaden, etc.
Beachten Sie bitte, dass zu einer zufriedenstellenden Anrechnung des Themas Monaden mehr als einfacher monadischer Code (z.B. nicht nur do-Notation) vorhanden sein muss.

  1. Datenbankanbindung (Persistent)

zusätzlich eine Datenbankanbindung implementieren (z.B. mit Persistent), beispielsweise um Spielstände persistent zu speichern, um zu einem späteren Zeitpunkt mit dem Spiel fortfahren zu können.

  1. Tests (?)
  2. AI/Automated Problem Solving

Das Thema KI / Automated Problem Solving ist des Weiteren nicht direkt ein Thema der funktionalen Programmierung.

UPDATED REQUIREMENTS
  1. TVars (nebenläufigkeit)

TVars decken ja eigentlich sogar auch Nebenläufiges Programmieren

  1. Lenses

Sie könnten noch ein paar Lenses für irgendwelche Datentypen (die sie ja wahrscheinlich sowieso haben) definieren und deren Verwendung demonstrieren.

  1. Unlösbare Probleme (State monade)

Die unlösbaren Probleme sind sicherlich auch ein guter Punkt, den Sie in der Abgabe ja kurz dokumentieren und begründen könnten (was geht da, warum nicht).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.