程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> 關於C++ >> C++完成N個骰子的點數算法

C++完成N個骰子的點數算法

編輯:關於C++

C++完成N個骰子的點數算法。本站提示廣大學習愛好者:(C++完成N個骰子的點數算法)文章只能為提供參考,不一定能成為您想要的結果。以下是C++完成N個骰子的點數算法正文


1. Android Monkey 完成操作流程:

預備:在eclipse裡裝置Phyon插件,可以選擇在線裝置,也能夠下載zip解壓後放在eclipse裝置目次的dropins下,如 : /personal/software/android_developtools/adt-bundle-mac-x86_64-20130522/eclipse/dropins/PyDev 2.8.2

插件預備停當就重啟eclipse,磨練PyDev能否正常任務,然後開端MonkeyRunner測試:

第一步:

gufeitekiMacBook-Pro:~ gufei$ cd /personal/software/android_developtools/adt-bundle-mac-x86_64-20130522/sdk/tools

第二步:

gufeitekiMacBook-Pro:tools gufei$ ls
Jetemulator-x86monkeyrunner
NOTICE.txtemulator64-armproguard
adb_has_moved.txtemulator64-mipssource.properties
androidemulator64-x86sqlite3
antetc1toolsupport
appshierarchyviewersystrace
ddmshprof-convtemplates
dmtracedumpjobbtraceview
draw9patchlibuiautomatorviewer
emulatorlintzipalign
emulator-armmksdcard
emulator-mipsmonitor

第三步:

gufeitekiMacBook-Pro:tools gufei$ ./emulator -avd android_480_800
emulator: emulator window was out of view and was recentered

然後從新翻開一個新的敕令窗口

第四步:

gufeitekiMacBook-Pro:~ gufei$ cd /personal/software/android_developtools/adt-bundle-mac-x86_64-20130522/sdk/tools
gufeitekiMacBook-Pro:tools gufei$ ./monkeyrunner
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_51

 第五步:

from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice,MonkeyImage

 第六步:

android_480_800.installPackage("/personal/developer/android/project/UnionPay/Android/UPClient_3_0_lib/bin/UPClient_3_0_lib.apk")

ps:外面的5指期待5s,可以不寫,代表永久期待,也能夠本身自界說時光。

 第七步:

android_480_800.installPackage("/personal/developer/android/project/UnionPay/Android/UPClient_3_0_lib/bin/UPClient_3_0_lib.apk")

裝置勝利後敕令窗口打印出:True

 第八步:

 

android_480_800.startActivity(component="com.unionpay/com.unionpay.client3.UPActivityWelcome")

 不雅察模仿器能否曾經翻開該界面

 第九步:(本身模仿點擊坐標)

 

android_480_800.touch(386.0,399.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(35.0,146.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(5.0,609.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(44.0,569.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(-1.0,-1.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(467.0,759.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(457.0,726.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(265.0,776.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(271.0,787.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(176.0,278.0,android_480_800.DOWN_AND_UP)
android_480_800.touch(187.0,257.0,android_480_800.DOWN_AND_UP)
result= android_480_800.takeSnapshot() 
result.writeToFile("/Users/gufei/Downloads/MonkeyRunnerShoot.png") 
print("OK!") 

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved