david-loman / runingball Goto Github PK
View Code? Open in Web Editor NEWThe project for the test
The project for the test
丧心病狂的小球(完成版): ============================================================================================================================= 简介: 该工程通过Eclipse完成,支持的最低版本为Android2.2。通过SurfaceView与多线程实现。由SurfaceView来管理绘图,而通过线程来分时段绘 图同时小球的运动独立的运行在一个线程中。 ============================================================================================================================= 如何使用: 1. 通过下载源码到本地,使用Eclipse打开,通过Eclipse的调试功能,在接入计算机的真机或虚拟机中打开。 2. 下载源码,在工程的bin目录下找到RuningBall.apk;通过豌豆荚等手机助手安装,安装后打开即可使用。 ============================================================================================================================= 功能 软件运行过程中通过add按钮添加小球,通过reset按钮重置小球。 在运行过程中每个新增的每个小球半径、位置、速度、颜色都随机产生。小球没有质量属性,以半径来替换之。reset会将小球清空而后新生成 一个小球。 ============================================================================================================================= 工程结构: 该工程由五个类构成,分别为Ball,Tools,MainActivity,BallsurfaceView,RuningBallThread。 Ball类:为存储球的基本信息并提供画球功能; Tools类:用于存储程序运行中的相关数据; BallsurfaceView类:用于画图,管理SurfaceView; RuningBallThread类:利用线程的方式管理小球的运动; MainActivity类:用于处理用户的交互; ============================================================================================================================= 可能存在的问题: 该工程目前已经完成,不过仍然有一些小的问题,在大量的测试中发现,两个小球偶尔会出现凹陷(两个小球的球心距小于二者的半径和)同时 有些碰撞可能不完全
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.