Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request #8

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Pull request #8

wants to merge 20 commits into from

Conversation

yu4763
Copy link

@yu4763 yu4763 commented Jun 9, 2018

  1. Fix bug about block rotation shape and overlapped last block.
  2. Add the function which previews next three blocks.
  3. Add score board.
  4. Add some sound effects and game over screen.
  5. Make blocks' frequency follow the tetris standard.
  6. Add pause function of tetris (when pressing 'p').

You can see other solved issues here:
https://github.com/18-1-SKKU-OSS/canvas-tetris/issues?q=is%3Aissue+is%3Aclosed

yjkim721 and others added 20 commits June 5, 2018 18:36
Block now rotates in standardized way.  The number of shapes now increases to 28.
Change audio format into mp3 becuase to fix issue 18-1-SKKU-OSS/canvas-tetris#11. Read sound file for each trigger (tetris.js) to emit multiple sound at the same time.
Resolve 18-1-SKKU-OSS/canvas-tetris#14
Expand the canvas are to draw next moving block and also make 'game over' function applied to expanded area.
Resolve 18-1-SKKU-OSS/canvas-tetris#13
The shadow of dropped position is shown to the user. Resolve 18-1-SKKU-OSS/canvas-tetris#5.
A shape now occur just once per one cycle, following tetris standard.
@kyuyeonpooh
Copy link
Contributor

Block ghost effect was also added.

<natures>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove eclipse project files!

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file

@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.JRE_CONTAINER
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file

@@ -0,0 +1 @@
Global
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file

0, 1, 0, 0,
0, 1, 0, 0,
0, 1 ],
[ 1, 1, 1, 1 ],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of repeating the shapes like this, perhaps generate a shape randomly and then rotate it at random. The way you have it now is too repeatitive.

};
if ( typeof keys[ e.keyCode ] != 'undefined' ) {
if ( typeof keys[ e.keyCode ] != 'undefined' && !lose) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the coding style from the rest of the project

@@ -11,26 +11,172 @@ function drawBlock( x, y ) {

// draws the board and the moving shape
function render() {
ctx.clearRect( 0, 0, W, H );
if ( pause == false ) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!pause


function gameOver() {
ctx.clearRect( 0, 0, 440, 600 );
clearInterval( setcolor );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent your code correctly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are trying to clean up overall source codes to keep your convention. Sorry for the mistake.

}
if ( next3[ y ][ x ] ) {
ctx.fillStyle = colors[ next3[ y ][ x ] - 1 ];
drawBlock( 10.5 + x, 9.5 + y );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate constants into beginning of file, make them semantic

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We feel very grateful for your feedback. Since we are in final-exam week, we will give you immediate revision after about one or two weeks. Thank you very much!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check our final resort to see what's going on! We are planning to clean up, simplify, and also optimize much more for better code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants