Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SpaceCookies
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Charlie Graham Carr
SpaceCookies
Commits
1159c719
Commit
1159c719
authored
Nov 06, 2017
by
Charlie Graham Carr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed code that broke it
parent
0f2f349c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
Start.class
Start.class
+0
-0
Start.java
Start.java
+20
-1
spacecookie.jpg
spacecookie.jpg
+0
-0
test.ish
test.ish
+5
-0
No files found.
Start.class
View file @
1159c719
No preview for this file type
Start.java
View file @
1159c719
import
java.lang.Exception
;
import
java.io.*
;
import
java.util.*
;
public
class
Start
{
...
...
@@ -29,11 +30,29 @@ public static void main(String[] args)
}
}
static
private
HashMap
<
String
,
String
>
variables
=
new
HashMap
<
String
,
String
>();
/** Process a single line of the input program.
* @param line Line to process.
*/
private
static
void
process
(
String
line
)
{
System
.
out
.
println
(
"Line: "
+
line
);
String
[]
bits
=
line
.
split
(
" "
);
if
(
bits
.
length
==
5
&&
bits
[
0
].
equals
(
"that"
)
&&
bits
[
2
].
equals
(
"looks"
)
&&
bits
[
3
].
equals
(
"about"
))
{
// might be a set variable commmand
variables
.
put
(
bits
[
1
],
bits
[
4
]);
}
else
if
(
bits
.
length
==
4
&&
bits
[
0
].
equals
(
"what"
)
&&
bits
[
1
].
equals
(
"was"
)
&&
bits
[
3
].
equals
(
"again?"
))
{
System
.
out
.
println
(
variables
.
get
(
bits
[
2
]));
}
public
static
void
process
(
String
line
)
{
String
[]
bits
=
line
.
split
(
" "
);
if
(
bits
.
length
==
5
&&
bits
[
0
]
equals
(
"that"
)
&&
bits
[
2
].
equals
(
"is"
)
&&
bits
[
3
].
equals
(
"now"
)){
variables
.
put
(
bits
[
1
],
bits
[
4
]);
}
}
}
}
}
spacecookie.jpg
deleted
100644 → 0
View file @
0f2f349c
190 KB
test.ish
0 → 100644
View file @
1159c719
that x looks about 6
what was x again?
that y is now 10
what was y?
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment