Skip to content

Commit a846b84

Browse files
authored
Update index.html
1 parent a7e8064 commit a846b84

1 file changed

Lines changed: 45 additions & 49 deletions

File tree

thomas/index.html

Lines changed: 45 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,79 @@
11
<!DOCTYPE html>
22
<html>
3-
43
<head>
54
<title>my home page</title>
65
<link href="style.css" rel="stylesheet" type="text/css">
7-
</head>
6+
<style>
7+
img {
8+
width: 204px;
9+
height: 128px;
10+
transition: width 5s;
11+
transition: height 4s;
12+
}
13+
14+
img:active {
15+
width: 264px;
16+
height: 228px;
17+
}
18+
</style>
819

20+
</head>
921
<body>
1022
<h1>My page</h1>
1123
<h2>How to Cheat on Flappy Cube</h2>
1224
<p>Just hold up</p>
1325
<p></p>
14-
<h2>Amazing links</h2><a HREF="https://en.m.wikipedia.org/wiki/Fish" > link to an amazing page</a> <a HREF="https://en.m.wikipedia.org/wiki/Fish"> link to a just as good page</a>
26+
<h2>Amazing links</h2><a HREF="https://en.m.wikipedia.org/wiki/Fish"> link to an amazing page</a> <a HREF="https://en.m.wikipedia.org/wiki/Fish"> link to a just as good page</a>
1527
<h2>What hobbies am I interested in</h2>
1628
<ul>
1729
<li>
1830
<a HREF="https://en.wikipedia.org/wiki/Wargaming"> Don't usually use wiki this much</a>
1931
</li>
2032
<li>
21-
<a HREF="https://www.w3schools.com/html/html_lists.asp"> How to do what I do in index.html</a>
33+
<a HREF="http://www.w3schools.com/html/html_lists.asp"> How to do what I do in index.html</a>
2234
</li>
2335
<li>The above are the main ones</li>
2436
</ul>
2537
<h2>Good game</h2>
26-
<img onclick="addFish()" src="fish.png" alt="good pic" style=";">
38+
<img onclick="addFish()" src="fish.png" alt="good pic" height="128px">
2739
<p>You have <span id="fishQuantity">0</span> fish</p>
28-
<h2> fish.com</h2>
29-
<p onclick="buyapond">Pond: 15 fish<p>
30-
<p onclick="buyafisherman"> Fisherman: 100 fish<p>
31-
<p onclick="buyacoralreef">coral reef: 150<p>
32-
<p onclick="buythegreatbarrierreef">coral the great barrier reef: 200<p>
40+
<h2> fish.com</h2>
41+
<p onclick="buy(20, 1)">Pond: 15 fish</p>
42+
<p onclick="buy(100, 10)"> Fisherman: 100 fish</p>
43+
<p onclick="buy(150, 20)">coral reef: 150</p>
44+
<p onclick="buy(200, 50)">coral the great barrier reef: 200</p>
3345
<script>
3446
var fish = 0;
35-
var fps = 0;
47+
var fps = 0;
48+
3649
function addFish() {
3750
fish = fish + 1;
38-
51+
3952
// Show them how many fish they have
4053
displayFish();
4154
}
4255

43-
// Display fish
44-
function displayFish() {
45-
fishQuantity.innerHTML = fish;
56+
// Display fish
57+
function displayFish() {
58+
fishQuantity.innerHTML = fish;
4659
}
47-
function addfps(){
48-
fish = fish + fps
49-
}
50-
51-
52-
function buyapond() {
53-
if(fish>19)
54-
fish = fish - 20
55-
fps = fps + 1
56-
}
57-
function buyafisherman() {
58-
if(fish>99)
59-
fish = fish - 100
60-
fps = fps + 10
61-
}
62-
function buyacoralreef () {
63-
if(fish>149)
64-
fish = fish - 150
65-
fps = fps + 20
66-
}
67-
function buythegreatbarrierreef () {
68-
if(fish>199)
69-
fish = fish - 200
70-
fps = fps + 50
71-
}
72-
73-
setInterval(addfps, 1000);
60+
61+
function addfps() {
62+
fish = fish + fps;
63+
displayFish();
64+
}
65+
66+
function buy(cost, fpsToAdd) {
67+
if (fish >= cost) {
68+
fish = fish - cost;
69+
displayFish();
70+
fps = fps + fpsToAdd;
71+
}
72+
}
73+
74+
setInterval(addfps, 1000);
7475
</script>
75-
76-
77-
78-
79-
80-
<h1> I am soooooooooooooooooooooooooooooooooo talented</h1>
81-
76+
<h1> I am soooooooooooooooooooooooooooooooooo talented</h1>
77+
8278
</body>
8379
</html>

0 commit comments

Comments
 (0)