Skip to content

Commit e96f939

Browse files
Initial commit
0 parents  commit e96f939

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2765
-0
lines changed

.replit

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
hidden=[".config"]
2+
3+
# hosting is currently hardcoded for this language
4+
# [hosting]
5+
# route = "/"
6+
# directory= "/"
7+
8+
[nix]
9+
channel = "stable-21_11"
10+
11+
[languages.html]
12+
pattern = "**/*.html"
13+
[languages.html.languageServer]
14+
start = ["vscode-html-language-server", "--stdio"]
15+
[languages.html.languageServer.initializationOptions]
16+
provideFormatter = true
17+
[languages.html.languageServer.configuration.html]
18+
customData = [ ]
19+
autoCreateQuotes = true
20+
autoClosingTags = true
21+
mirrorCursorOnMatchingTag = false
22+
23+
[languages.html.languageServer.configuration.html.completion]
24+
attributeDefaultValue = "doublequotes"
25+
26+
[languages.html.languageServer.configuration.html.format]
27+
enable = true
28+
wrapLineLength = 120
29+
unformatted = "wbr"
30+
contentUnformatted = "pre,code,textarea"
31+
indentInnerHtml = false
32+
preserveNewLines = true
33+
indentHandlebars = false
34+
endWithNewline = false
35+
extraLiners = "head, body, /html"
36+
wrapAttributes = "auto"
37+
templating = false
38+
unformattedContentDelimiter = ""
39+
40+
[languages.html.languageServer.configuration.html.suggest]
41+
html5 = true
42+
43+
[languages.html.languageServer.configuration.html.validate]
44+
scripts = true
45+
styles = true
46+
47+
[languages.html.languageServer.configuration.html.hover]
48+
documentation = true
49+
references = true
50+
51+
[languages.html.languageServer.configuration.html.trace]
52+
server = "off"
53+
54+
[languages.javascript]
55+
pattern = "**/{*.js,*.jsx,*.ts,*.tsx,*.mjs,*.cjs}"
56+
[languages.javascript.languageServer]
57+
start = ["typescript-language-server", "--stdio"]
58+
59+
# TODO autocomplete relies on snippet support, which we don't advertise to LSP servers.
60+
# For now CSS autocomplete will use built-in codemirror, which is not perfect but good enough
61+
[languages.css]
62+
pattern = "**/{*.less,*.scss,*.css}"
63+
[languages.css.languageServer]
64+
start = ["vscode-css-language-server", "--stdio"]
65+
[languages.css.languageServer.configuration.css]
66+
customData = [ ]
67+
validate = true
68+
69+
[languages.css.languageServer.configuration.css.completion]
70+
triggerPropertyValueCompletion = true
71+
completePropertyWithSemicolon = true
72+
73+
[languages.css.languageServer.configuration.css.hover]
74+
documentation = true
75+
references = true
76+
77+
[languages.css.languageServer.configuration.css.lint]
78+
# Configure linting
79+
# ignore = don't show any warning or error
80+
# warning = show yellow underline
81+
# error = show red underline
82+
argumentsInColorFunction = "error" # Invalid number of parameters
83+
boxModel = "ignore" # Do not use width or height when using padding or border
84+
compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties"
85+
duplicateProperties = "warning" # Do not use duplicate style definitions
86+
emptyRules = "warning" # Do not use empty rulesets
87+
float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes.
88+
fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties
89+
hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers
90+
idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML.
91+
ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older
92+
important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored.
93+
importStatement = "ignore" # Import statements do not load in parallel
94+
propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display
95+
universalSelector = "ignore" # The universal selector (*) is known to be slow
96+
unknownAtRules = "warning" # Unknown at-rule
97+
unknownProperties = "warning" # Unknown property.
98+
validProperties = [ ] # add some properties that the linter doesn't know about
99+
unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property.
100+
vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property
101+
zeroUnits = "ignore" # No unit for zero needed
102+
103+
[languages.css.languageServer.configuration.css.trace]
104+
server = "off"
105+
106+
[languages.css.languageServer.configuration.scss]
107+
validate = true
108+
109+
[languages.css.languageServer.configuration.scss.completion]
110+
triggerPropertyValueCompletion = true
111+
completePropertyWithSemicolon = true
112+
113+
[languages.css.languageServer.configuration.scss.hover]
114+
documentation = true
115+
references = true
116+
117+
[languages.css.languageServer.configuration.scss.lint]
118+
# Configure linting
119+
# ignore = don't show any warning or error
120+
# warning = show yellow underline
121+
# error = show red underline
122+
argumentsInColorFunction = "error" # Invalid number of parameters
123+
boxModel = "ignore" # Do not use width or height when using padding or border
124+
compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties"
125+
duplicateProperties = "warning" # Do not use duplicate style definitions
126+
emptyRules = "warning" # Do not use empty rulesets
127+
float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes.
128+
fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties
129+
hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers
130+
idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML.
131+
ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older
132+
important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored.
133+
importStatement = "ignore" # Import statements do not load in parallel
134+
propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display
135+
universalSelector = "ignore" # The universal selector (*) is known to be slow
136+
unknownAtRules = "warning" # Unknown at-rule
137+
unknownProperties = "warning" # Unknown property.
138+
validProperties = [ ] # add some properties that the linter doesn't know about
139+
unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property.
140+
vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property
141+
zeroUnits = "ignore" # No unit for zero needed"
142+
143+
[languages.css.languageServer.configuration.less]
144+
validate = true
145+
146+
[languages.css.languageServer.configuration.less.completion]
147+
triggerPropertyValueCompletion = true
148+
completePropertyWithSemicolon = true
149+
150+
[languages.css.languageServer.configuration.less.hover]
151+
documentation = true
152+
references = true
153+
154+
[languages.css.languageServer.configuration.less.lint]
155+
# Configure linting
156+
# ignore = don't show any warning or error
157+
# warning = show yellow underline
158+
# error = show red underline
159+
argumentsInColorFunction = "error" # Invalid number of parameters
160+
boxModel = "ignore" # Do not use width or height when using padding or border
161+
compatibleVendorPrefixes = "ignore" # When using a vendor-specific prefix make sure to also include all other vendor-specific properties"
162+
duplicateProperties = "warning" # Do not use duplicate style definitions
163+
emptyRules = "warning" # Do not use empty rulesets
164+
float = "ignore" # Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes.
165+
fontFaceProperties = "warning" # @font-face rule must define 'src' and 'font-family' properties
166+
hexColorLength = "error" # Hex colors must consist of three, four, six or eight hex numbers
167+
idSelector = "ignore" # Selectors should not contain IDs because these rules are too tightly coupled with the HTML.
168+
ieHack = "ignore" # IE hacks are only necessary when supporting IE7 and older
169+
important = "ignore" # Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored.
170+
importStatement = "ignore" # Import statements do not load in parallel
171+
propertyIgnoredDueToDisplay = "warning" # Property is ignored due to the display
172+
universalSelector = "ignore" # The universal selector (*) is known to be slow
173+
unknownAtRules = "warning" # Unknown at-rule
174+
unknownProperties = "warning" # Unknown property.
175+
validProperties = [ ] # add some properties that the linter doesn't know about
176+
unknownVendorSpecificProperties = "ignore" # Unknown vendor specific property.
177+
vendorPrefix = "warning" # When using a vendor-specific prefix also include the standard property
178+
zeroUnits = "ignore" # No unit for zero needed"
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width">
7+
<title>replit</title>
8+
<link href="style.css" rel="stylesheet" type="text/css" />
9+
</head>
10+
11+
<body>
12+
Code the Game class in script.js
13+
<script src="script.js"></script>
14+
</body>
15+
16+
</html>
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
class Game {
2+
constructor(player1Name = 'pl1', player2Name = 'pl2') {
3+
// Flag that indicates if the game is over or not
4+
this.theEnd = false;
5+
6+
this.player1 = {
7+
name: player1Name,
8+
health: 100
9+
};
10+
11+
this.player2 = {
12+
name: player2Name,
13+
health: 100
14+
};
15+
}
16+
17+
//Starts the game and logs out the status of players
18+
start() {
19+
20+
}
21+
22+
//Console log the winner of the battle
23+
declareWinner() {
24+
25+
}
26+
27+
//If player 1 or player 2 health is below 0
28+
//Mark theEnd true, to stop the game
29+
checkTheEnd() {
30+
31+
}
32+
33+
//Console log the name and health of both players
34+
//Ex: Player 1: 100 | Player 2: 50
35+
playerStatus() {
36+
37+
}
38+
39+
//Reset health of player 1 and player 2 to 100
40+
//Reset theEnd to false
41+
reset() {
42+
43+
}
44+
45+
//Generate a random number between 1 and 10 using Math.random()
46+
//Use that number to decrease health from player 2
47+
pl1AttackPl2() {
48+
49+
}
50+
51+
//Generate a random number between 1 and 10 using Math.random()
52+
//Use that number to decrease health from player 1
53+
pl2AttackPl1() {
54+
55+
}
56+
57+
//Generate a random number between 1 and 5 using Math.random()
58+
//Use that number to increase health of player 1
59+
pl1Heal() {
60+
61+
}
62+
63+
//Generate a random number between 1 and 5 using Math.random()
64+
//Use that number to increase health of player 2
65+
pl2Heal() {
66+
67+
}
68+
}
69+
70+
// Initialize the class here
71+
// Call the start function of the game
72+
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
body {
2+
background: 'red';
3+
}
4+
5+
#result {
6+
background:'blue';
7+
}
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width">
7+
<title>replit</title>
8+
<link href="style.css" rel="stylesheet" type="text/css" />
9+
</head>
10+
11+
<body>
12+
13+
<div>The solution for Fighting Game</div>
14+
<br>
15+
16+
<button id="play">Run simulation</button>
17+
18+
<br>
19+
<div class="resultContainer">
20+
<div id="result">Hi</div>
21+
</div>
22+
<script src="solution.js"></script>
23+
</body>
24+
25+
</html>

0 commit comments

Comments
 (0)