Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5e48d81

Browse files
committedOct 3, 2024
working prototype, with 80+ questions
0 parents  commit 5e48d81

10 files changed

+1156
-0
lines changed
 

‎.formatter.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

‎.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# The directory Mix will write compiled artifacts to.
2+
/_build/
3+
4+
# If you run "mix test --cover", coverage assets end up here.
5+
/cover/
6+
7+
# The directory Mix downloads your dependencies sources to.
8+
/deps/
9+
10+
# Where third-party dependencies like ExDoc output generated docs.
11+
/doc/
12+
13+
# Ignore .fetch files in case you like to edit your project deps locally.
14+
/.fetch
15+
16+
# If the VM crashes, it generates a dump, let's ignore it too.
17+
erl_crash.dump
18+
19+
# Also ignore archive artifacts (built via "mix archive.build").
20+
*.ez
21+
22+
# Ignore package tarball (built via "mix hex.build").
23+
functional_quiz_game-*.tar
24+
25+
# Temporary files, for example, from tests.
26+
/tmp/

‎README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Functional Programming Elixir Quiz Game
2+
3+
**A command-line quiz game, written in Elixir, to test your skills on Elixir and functional programming.**
4+

‎functional_quiz_game

1.13 MB
Binary file not shown.

‎lib/cli.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
defmodule FunctionalQuizGame.CLI do
2+
def main(_args) do
3+
FunctionalQuizGame.QuizGame.start()
4+
end
5+
end

‎lib/quiz.ex

Lines changed: 538 additions & 0 deletions
Large diffs are not rendered by default.

‎mix.exs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
defmodule FunctionalQuizGame.MixProject do
2+
use Mix.Project
3+
4+
def project do
5+
[
6+
app: :functional_quiz_game,
7+
version: "0.1.0",
8+
elixir: "~> 1.14",
9+
start_permanent: Mix.env() == :prod,
10+
escript: [main_module: FunctionalQuizGame.CLI],
11+
deps: deps()
12+
]
13+
end
14+
15+
# Run "mix help compile.app" to learn about applications.
16+
def application do
17+
[
18+
extra_applications: [:logger]
19+
]
20+
end
21+
22+
# Run "mix help deps" to learn about dependencies.
23+
defp deps do
24+
[
25+
# {:dep_from_hexpm, "~> 0.3.0"},
26+
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
27+
]
28+
end
29+
end

‎quiz.exs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

‎test/functional_quiz_game_test.exs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
defmodule FunctionalQuizGameTest do
2+
use ExUnit.Case
3+
doctest FunctionalQuizGame
4+
5+
test "greets the world" do
6+
assert FunctionalQuizGame.hello() == :world
7+
end
8+
end

‎test/test_helper.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ExUnit.start()

0 commit comments

Comments
 (0)
Please sign in to comment.