-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e55587
commit 5c8ccfe
Showing
14 changed files
with
1,217 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
display | ||
salutation | ||
title | ||
english | ||
Greeting | ||
french | ||
Salutation | ||
function | ||
hello | ||
output | ||
english | ||
Hello World! | ||
french | ||
Bonjour tout le monde ! | ||
graph | ||
function.hello -> display.salutation |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
display | ||
salutation | ||
title | ||
english | ||
Greeting | ||
french | ||
Salutation | ||
function | ||
hello | ||
output | ||
english | ||
Hello World! | ||
french | ||
Bonjour tout le monde ! | ||
graph | ||
function.hello -> display.salutation |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
display_input | ||
name | ||
title | ||
english | ||
Name | ||
french | ||
Nom | ||
display | ||
personal_salutation | ||
title | ||
english | ||
Greeting | ||
french | ||
Salutation | ||
function | ||
hello_someone | ||
input | ||
name | ||
output | ||
english | ||
Hello {name}! | ||
french | ||
Bonjour {name} ! | ||
graph | ||
input.name -> function.hello_someone | ||
function.hello_someone -> display.personal_salutation |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
display_input | ||
name | ||
title | ||
english | ||
Name | ||
french | ||
Nom | ||
display | ||
personal_salutation | ||
title | ||
english | ||
Greeting | ||
french | ||
Salutation | ||
function | ||
hello_someone | ||
input | ||
name | ||
output | ||
english | ||
Hello {name}! | ||
french | ||
Bonjour {name} ! | ||
graph | ||
input.name -> function.hello_someone | ||
function.hello_someone -> display.personal_salutation |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
########### | ||
# Imports # | ||
########### | ||
com.gouttelettes.types.date | ||
com.gouttelettes.functions.today | ||
|
||
|
||
######### | ||
# Types # | ||
######### | ||
date_of_birth | ||
format | ||
date | ||
constraints | ||
before_or_equal_today | ||
assert | ||
self <= today() | ||
error_message | ||
en | ||
Date must be inferior or equal to today | ||
|
||
|
||
################ | ||
# Enumerations # | ||
################ | ||
species | ||
dog | ||
english | ||
Dog | ||
french | ||
Chien | ||
human | ||
english | ||
Human | ||
french | ||
humain | ||
|
||
|
||
country | ||
France | ||
USA | ||
|
||
|
||
########## | ||
# Inputs # | ||
########## | ||
date_of_birth | ||
title | ||
english | ||
Date of birth | ||
french | ||
Date de naissance | ||
type | ||
date_of_birth | ||
|
||
|
||
country | ||
title | ||
english | ||
Country | ||
french | ||
Pays | ||
type | ||
country | ||
|
||
|
||
species | ||
title | ||
english | ||
Species | ||
french | ||
Espèces | ||
type | ||
species | ||
|
||
|
||
########### | ||
# Outputs # | ||
########### | ||
age | ||
title | ||
english | ||
Age | ||
french | ||
Age | ||
type | ||
number | ||
|
||
|
||
drive_alone_without_restriction | ||
title | ||
english | ||
Can drive alone without restriction | ||
french | ||
Peut conduire seul sans restriction | ||
type | ||
yes_no_maybe | ||
|
||
|
||
explanation | ||
title | ||
english | ||
Explanation | ||
french | ||
Explication | ||
type | ||
text | ||
|
||
|
||
############# | ||
# Functions # | ||
############# | ||
compute_age | ||
inputs | ||
date_of_birth | ||
outputs | ||
age | ||
if | ||
date_of_birth <= today -> today - date_of_birth | ||
|
||
|
||
can_drive_alone_without_restriction | ||
inputs | ||
age | ||
country | ||
outputs | ||
yes_no_maybe | ||
optional text | ||
if | ||
country == France and 18 <= age -> yes | ||
country == France and age < 18 -> no | ||
country == USA and 18 <= age -> yes | ||
country == USA and 17 <= age < 18 -> maybe "Depends of the state." | ||
"Source: https://en.wikipedia.org/wiki/List_of_minimum_driving_ages#North_America." | ||
country == USA and age < 17 -> no | ||
|
||
|
||
######### | ||
# Graph # | ||
######### | ||
date_of_birth -> function.compute_age -> age | ||
age country -> can_drive_alone_without_restriction -> drive_alone_without_restriction explanation |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import | ||
std.display.hex_game | ||
display | ||
plateau | ||
type | ||
hex_game | ||
title | ||
english | ||
Greeting | ||
french | ||
Salutation | ||
function | ||
hello | ||
output | ||
english | ||
Hello World! | ||
french | ||
Bonjour tout le monde ! | ||
graph | ||
function.hello -> display.salutation |
Binary file not shown.
Oops, something went wrong.