five-lines's People
Forkers
jmgimeno rhw5688 cptcrunchy krishnatray plcancelleri carlosgub test-driven-development mattmusc cptully anusorncodium saeedcodium earthpyy siripornpp athiwat-codium thitikorn-aomsin pharanyu-nui chanaveewinner bosspiyawut kukkikkpl yemarn510 delvor64 andyglick heedfull kirkb timm3 azurecloudmonk ten8ciousb goosebay111 ferdi145 gendie vincentvanderwalt hruhek refactoringkata melv robrandall larseckart cinexin gigamonkey pcharleszemora superdoopertrooper robbie-hinman stephen-kawaguchi tarnishedraven nadgerz szymongabrek jakub-lat jchunky cameronjtong duchainer ethannguyenit rafaelwerner pozzer stma1995 nilichen eugene-coding-dojo unicojoyhug ahmadabdallah0-0 ivangeorgiev platonmick thepotap caroscave mikhailnovik millerj20 jkwchunjae nemoinho sosoyim achrafl0 mathieueveillard timostermann yeverchan cybran77 jraisane mrjooka kimbyungkwan thomaseyde 7696122 toyseed loisocello therealmephisto art3mk4 juanpabloalvis sffej rockinguitar chicle911 sarava-neela warrentyler owlwasrowk siranweb sophiabrandt vishwa-raghavendra arizavala jon-at-github samkimuel lenkim ryul1206 timar07 kissle pjstevens sgo8308 qileifive-lines's Issues
The Before is missing
Falling and Resting are not implementing FallingState
As stated in the title the classes Falling
and Resting
are not implementing FallingState
which leads to no errors when refactoring player
into moveHorizontal
.
Dont work the game in the section 6.5 base code
Hi, I see an error on the book
Hi, I see this error
This is the code on your repo
function moveHorizontal(dx: number) {
if (map[playery][playerx + dx] === Tile.FLUX
|| map[playery][playerx + dx] === Tile.AIR) {
moveToTile(playerx + dx, playery);
} else if ((map[playery][playerx + dx] === Tile.STONE
|| map[playery][playerx + dx] === Tile.BOX)
&& map[playery][playerx + dx + dx] === Tile.AIR
&& map[playery + 1][playerx + dx] !== Tile.AIR) {
map[playery][playerx + dx + dx] = map[playery][playerx + dx];
moveToTile(playerx + dx, playery);
} else if (map[playery][playerx + dx] === Tile.KEY1) {
remove(Tile.LOCK1);
moveToTile(playerx + dx, playery);
} else if (map[playery][playerx + dx] === Tile.KEY2) {
remove(Tile.LOCK2);
moveToTile(playerx + dx, playery);
}
}
without the refactoring.
Dismatch with the code :D
Issue in the book (v1 and v2)
I'm here in the book
and if you go to the section 5.5
https://github.com/maxipaxi/five-lines/blob/section-5.5/index.ts
I see more differences between the class Stone and FallingStone. Can you help me with that. I don't know if this can be answered after pages but when I was in that page I feel confused :(
Cheers.
Not use your const variables
Hi, I was looking in section 6.3 and I saw this
https://github.com/maxipaxi/five-lines/blob/4cdf21fb152b3bb5a6fdf3ca9c3bd83a8858840e/index.ts#L365
You dont use your const variables on the window.addEventListener Listener :D. I don't know where you start to dont use it :).
const LEFT_KEY = 37;
const UP_KEY = 38;
const RIGHT_KEY = 39;
const DOWN_KEY = 40;
window.addEventListener("keydown", e => {
if (e.keyCode === 37 || e.key === "a") inputs.push(new Left()); //HERE
else if (e.keyCode === 38 || e.key === "w") inputs.push(new Up()); //HERE
else if (e.keyCode === 39 || e.key === "d") inputs.push(new Right()); //HERE
else if (e.keyCode === 40 || e.key === "s") inputs.push(new Down()); //HERE
});
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.