Seventh week, the test of the mobile module

Source: Internet
Author: User

about the character move module, in the test bug first use black box test, in the character movement found a lot of bugs such as when the character moved with the object collision, sometimes can not perfect collision, sometimes early on the collision, some time may not happen at all.

It is observed that the white box test is used, and some small programs are added to the mobile module.

For example, the following thread.

public static class Zuobiao extends Thread implements Jichu
{
public void Run () {
while (true)
{
SYSTEM.OUT.PRINTLN ("Automatic Reminder:" +movet.getx () + "" + (Movet.gety ()));
try {
Sleep (1000);
} catch (Interruptedexception e) {
E.printstacktrace ();
}
}
}
}

The function of this thread is to report the coordinates once every second. So I can judge by this coordinate with the coordinates of the collision on the map above, the collision is where the problem arises.

The second is about the map reading, because the map maker and the mobile module is two different programs, simply by reading the function of true and false simply can't tell if the map is correctly read to the map, so some code

System.out.println (Movet.getx () + "" +movet.gety ()); Coordinates of the current picture drawing

System.out.println (Readmap.map1[i][j]); Digital label of the current picture

Based on the information returned by these two feedbacks, the map is plotted successfully.

Seventh week, the test of the mobile module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.