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.

The C++26 standard draft is now complete, reports Herb Sutter, long-time C++ expert and former chair of the ISO C++ standards committee. The finalized draft introduces reflection, enhances memory safety without requiring code rewrites, adds contracts with preconditions and postconditions alongside a new assertion statement, and establishes a unified framework for concurrency and parallelism.
By Sergio De Simone
Meta introduces Just-in-Time (JiT) testing, a dynamic approach that generates tests during code review instead of relying on static test suites. The system improves bug detection by ~4x in AI-assisted development using LLMs, mutation testing, and intent-aware workflows like Dodgy Diff. It reflects a shift toward change-aware, AI-driven software testing in agentic development environments
By Leela Kumili
A new blog from the Cloud Native Computing Foundation highlights a critical gap in how organizations are deploying large language models (LLMs) on Kubernetes: while Kubernetes excels at orchestrating and isolating workloads, it does not inherently understand or control the behavior of AI systems, creating a fundamentally different and more complex threat model.
By Craig Risi
Anthropic has introduced a new Code Review feature for Claude Code, adding an agent-based pull request review system that analyzes code changes using multiple AI reviewers.
By Daniel Dominguez
Matheus Albuquerque shares strategies for optimizing a massive CX platform, moving from React 15 and Webpack 1 to modern standards. He discusses using AST-based codemods for large-scale migrations, implementing differential serving with module/nomodule, and leveraging Preact to shrink footprints. He explains how to balance cutting-edge performance with strict legacy browser constraints.
By Matheus Albuquerque
© 2026 Created by Michael Levin.
Powered by