Updates to Typescript highlighting
This commit is contained in:
parent
99f28492c1
commit
29e19fc062
2 changed files with 29 additions and 11 deletions
|
|
@ -43,12 +43,30 @@ module Sayings {
|
|||
}
|
||||
}
|
||||
}
|
||||
var greeter = new Sayings.Greeter("world");
|
||||
module Mankala {
|
||||
export class Features {
|
||||
public turnContinues = false;
|
||||
public seedStoredCount = 0;
|
||||
public capturedCount = 0;
|
||||
public spaceCaptured = NoSpace;
|
||||
|
||||
var button = document.createElement('button')
|
||||
button.innerText = "Say Hello"
|
||||
button.onclick = function() {
|
||||
alert(greeter.greet())
|
||||
}
|
||||
public clear() {
|
||||
this.turnContinues = false;
|
||||
this.seedStoredCount = 0;
|
||||
this.capturedCount = 0;
|
||||
this.spaceCaptured = NoSpace;
|
||||
}
|
||||
|
||||
document.body.appendChild(button)
|
||||
public toString() {
|
||||
var stringBuilder = "";
|
||||
if (this.turnContinues) {
|
||||
stringBuilder += " turn continues,";
|
||||
}
|
||||
stringBuilder += " stores " + this.seedStoredCount;
|
||||
if (this.capturedCount > 0) {
|
||||
stringBuilder += " captures " + this.capturedCount + " from space " + this.spaceCaptured;
|
||||
}
|
||||
return stringBuilder;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue