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.

AWS recently introduced S3 Files, which lets users mount an Amazon S3 bucket and access its data through a standard file system interface. Applications can read and write files using standard file operations, while the system automatically translates them into S3 requests, allowing compute services to work directly with data stored in S3.
By Renato Losio
Google has announced the release of Gemma 4, a series of open-weight AI models, including variants with 2B, 4B, 26B, and 31B parameters, under the Apache 2.0 license. Key features include enhanced video and image processing, audio input on smaller models, and extended context windows up to 256K tokens.
By Hien Luu
Cloudflare has launched a new Model Context Protocol (MCP) server powered by Code Mode, enabling AI agents to interact with large APIs with minimal token usage. The server reduces context footprint across 2,500+ endpoints, improves multi-API orchestration, and provides a secure, code-centric execution environment for LLM agents.
By Leela Kumili
Dany Lepage discusses the architectural journey of porting a hit VR title to seven non-VR platforms. He explains how his team solved the challenges of cross-progression, diverse input paradigms, and maintaining release velocity across Steam, iOS, and PlayStation. Beyond the tech, he shares candid lessons on the "product fit" gap when translating immersive social presence to 2D screens.
By Dany Lepage
Software platforms must be treated as products. Success requires balancing engineering, design, usability, security, and value for internal customers and the organisation, Abby Bangser mentioned in her talk Platform as a Product. A product mindset, clear ownership, and continuous investment prevent bottlenecks, platform decay, and wasted effort, enabling scalable, sustainable value over time.
By Ben Linders
© 2026 Created by Michael Levin.
Powered by