Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
vbatcnam authored Feb 21, 2024
1 parent e15ea92 commit dfb0e61
Show file tree
Hide file tree
Showing 5 changed files with 927 additions and 0 deletions.
218 changes: 218 additions & 0 deletions Mon premier jeu d'élevage/egg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions Mon premier jeu d'élevage/elevage.fg
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
def compte_a_rebours (p_depart):
while p_depart > 0 :
waitSeconds(1)
p_depart -= 1
displayMessageIn(p_depart, '#timer')

def naissance():
var avatar := awaitFileContent('poussin.svg', 'text')
displayMessageIn(avatar, '#scene')

def nourrir():
displayNewMessage("Je n'ai plus faim !")


# Préparation de la scène
#===============================================
# On place la scène de la maison. C'est la scène principale.
var oeuf := awaitFileContent('egg.svg', 'text')
displayMessageIn(oeuf, '#scene')


# Attendre click sur bouton "couver"
awaitClickBeep('#action')

# Initialiser et afficher le compteur
var max := 5
displayMessageIn(max, '#timer')

# Couver pendant un nombre de jours déterminés.
#===============================================
compte_a_rebours(max)

#~ L'oeuf éclot.
#===============
naissance()

#~ nourrir le bébé en parallèle le bébé grandit
#==============================================
# afficher bouton "nourrir"
displayMessageIn( 'nourrir', '#action')
awaitClickBeep ('#action')
nourrir()

22 changes: 22 additions & 0 deletions Mon premier jeu d'élevage/general.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
body, html {
height: 100%;
}

#gameBoard, body, html {
display: grid;
place-items: center;
}

#scene {
position: relative;
}

#avatar {
position: absolute;
top: 260px;
left: 300px;
}

.temperature, lampe{
cursor: pointer
}
27 changes: 27 additions & 0 deletions Mon premier jeu d'élevage/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Mon premier familier</title>
<link rel="shortcut icon" href="#">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/lib.css">
<link rel="stylesheet" href="general.css">
</head>

<body>
<div id="gameBoard">
<figure id="scene"></figure>
<button id="action">Couver</button>
<p id="timer"></p>
</div>

<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/libStd.fg" type="application/funcsug"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/libDOM.fg" type="application/funcsug"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/libDOMSVG.fg" type="application/funcsug"></script>
<script src="elevage.fg" type="application/funcsug"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/parser.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/parserPy.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/interpreter.js"></script>
<script src="https://cdn.jsdelivr.net/gh/cl4cnam/funcSug/DOMloader.js"></script>
</body>
</html>
Loading

0 comments on commit dfb0e61

Please sign in to comment.