Codetown ::: a software developer's community
Hi to all;
I try to program " tetris game "
First i did the point about :
Cube Block falling to the floor and another one appear then falling also but my problem is whe cube block fall and there is another one the floor the falling mix with the one on the floor !!!
Although i make a conditon that prevent mixing.
from here http://www.mediafire.com/?khg2p2mlpxpixz6 you can download my code .
There is there package in package TetrisView There is class TetrisCell which have the problem in method moveBlockVerticle()();
you will fin dthis code in it for prevent mixing bloks :
if (tetrisBlockShapesEnum == tetrisBlockShapesEnum.CUBE_BLOCK && nextRow - 2 == blockData.getPoint().getX()
|| tetrisBlockShapesEnum == tetrisBlockShapesEnum.I_BOLCK && nextRow - 4 == blockData.getPoint().getX()) {
canDraw = false;
} else {
canDraw = true;
}
but also the cude block mix !!!!
why this !!!
I hope to help me
thanks in advnce
Tags:
Codetown is a social network. It's got blogs, forums, groups, personal pages and more! You might think of Codetown as a funky camper van with lots of compartments for your stuff and a great multimedia system, too! Best of all, Codetown has room for all of your friends.
Created by Michael Levin Dec 18, 2008 at 6:56pm. Last updated by Michael Levin May 4, 2018.
Check out the Codetown Jobs group.

At QCon SF 2025, Michelle Brush of Google explored the evolving landscape of software engineering in her keynote, “Humans in the Loop: Engineering Leadership in a Chaotic Industry.” She highlighted the complexities engineers face amid automation and AI, stressing the importance of conscious competence, higher-level problem-solving, and effective leadership in navigating today's challenges.
By Andrew Hoblitzell
Airbnb upgraded Mussel, its multi-tenant key-value store, replacing static per-client rate limits with an adaptive, resource-aware traffic control system. The redesign ensures resilience during traffic spikes, protects critical workflows, and maintains fair usage across thousands of tenants while scaling efficiently.
By Leela Kumili
Emma Yuan Fang explains the Zero Trust mindset required to combat modern software supply chain attacks. She details security controls for dependency management, including SBOM (Software Bill of Materials), artifact signing, Git commit signing, and CI/CD hardening. Learn how to implement security gating, enforce policies as code, and manage secrets across your build and runtime environments.
By Emma Yuan Fang
Google has introduced Code Wiki, a new platform designed to keep software documentation continuously synchronized with the code it describes. The system generates a structured wiki for each repository, automatically updates it after every change, and powers an integrated chat interface that understands the entire codebase.
By Robert Krzaczyński
AnalogJS 2.0 has launched, enhancing Angular development with new content management features, optimized builds, and upgraded tooling. This full-stack meta-framework simplifies handling content as reactive resources while reducing bundle sizes and installation footprints. Embrace seamless migration for a modern, efficient web experience tailored for content-rich applications.
By Daniel Curtis
© 2025 Created by Michael Levin.
Powered by