Skip to content

Takzuin/Rubik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Basic Rubik's Cube in Ursina

This Python script creates a basic Rubik's Cube using the Ursina game engine. It allows interaction with the cube by clicking on its sides to rotate them. Features:

Interactive Cube: Click on any side of the cube to rotate it.
Randomize: Button to randomize the cube's initial state.
Win Detection: Automatically detects when the cube is solved and displays a message.

How to Use:

Rotate Cube Sides: Left-click on a side of the cube to rotate it clockwise. Right-click to rotate counter-clockwise.

Randomize Cube: Click the "randomize" button to scramble the cube's colors.

Requirements:

Python
Ursina game engine

Example:

Installation and Execution:

Clone the repository or download the script rubiks_cube.py.

Install Ursina by following the installation instructions.

Open a terminal or command prompt and navigate to the directory containing rubiks_cube.py.

Run the script by typing python rubiks_cube.py.

Credits:

This script uses the Ursina game engine for Python, which simplifies the creation of 3D games and simulations. Español Cubo de Rubik Básico en Ursina

Este script en Python crea un cubo de Rubik básico utilizando el motor de juegos Ursina. Permite interactuar con el cubo haciendo clic en sus lados para rotarlos. Características:

Cubo Interactivo: Haz clic en cualquier lado del cubo para rotarlo.
Aleatorización: Botón para aleatorizar el estado inicial del cubo.
Detección de Solución: Detecta automáticamente cuando el cubo está resuelto y muestra un mensaje.

Cómo Usar:

Rotar Lados del Cubo: Haz clic izquierdo en un lado del cubo para rotarlo en sentido horario. Haz clic derecho para rotarlo en sentido antihorario.

Aleatorizar Cubo: Haz clic en el botón "randomize" para mezclar los colores del cubo.

Requisitos:

Python
Motor de juegos Ursina

Ejemplo:

Instalación y Ejecución:

Clona el repositorio o descarga el script rubiks_cube.py.

Instala Ursina siguiendo las instrucciones de instalación.

Abre una terminal o línea de comandos y navega al directorio que contiene rubiks_cube.py.

Ejecuta el script escribiendo python rubiks_cube.py.

Créditos:

Este script utiliza el motor de juegos Ursina para Python, que simplifica la creación de juegos y simulaciones en 3D.

Releases

No releases published

Packages

 
 
 

Languages