Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

道路敷設時、同じマスをもう一度クリックするとオブジェクトが無効に #8

Open
yotiosoft opened this issue Aug 8, 2022 · 2 comments

Comments

@yotiosoft
Copy link
Owner

ToDo: 更新する必要のないConnectableオブジェクトには何も変更しない
また、無効なオブジェクトが発見されたら自動で削除するようにする
(グローバルな配列にpudh backしておくなど、なるべく走査が必要ない構造を取る)

@yotiosoft
Copy link
Owner Author

yotiosoft commented Aug 17, 2022

Debug > connect() at (0, 0): before: 0 after: 1
Debug > addDirectionID(): North
Debug > connect(): set roadtypeconect 1 / 7
dx:0, dy:1
Debug > connect() at (0, 0): before: 0 after: 2
Debug > addDirectionID(): South
Debug > connect(): set roadtypeconect 2 / 7
into build connect type at 27,16
use tiles: 1,1
oc:27,16
break at 27,16
call deleteObject: 27, 16
Debug > delete object at 27, 16 of 0, 0
delete object at 27, 16 of 0, 0
build at 27,16 : Two_lane_normal_road(none_line) 10174
dx:0, dy:-1
Debug > connect() at (0, 0): before: 2 after: 1
Debug > addDirectionID(): North
Debug > connect(): set roadtypeconect 3 / 3
dx:0, dy:1
Debug > connect() at (0, 0): before: 0 after: 2
Debug > addDirectionID(): South
Debug > connect(): set roadtypeconect 2 / 7
into build connect type at 28,16
use tiles: 1,1
oc:28,16
break at 28,16
call deleteObject: 28, 16
Debug > delete object at 28, 16 of 0, 0
delete object at 28, 16 of 0, 0
build at 28,16 : Two_lane_normal_road(none_line) 10175
dx:1, dy:0
Debug > connect() at (0, 0): before: 2 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 7 / 4
dx:-1, dy:0
Debug > connect() at (0, 0): before: 0 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 9 / 7
into build connect type at 29,16
use tiles: 1,1
oc:29,16
break at 29,16
call deleteObject: 29, 16
Debug > delete object at 29, 16 of 0, 0
delete object at 29, 16 of 0, 0
build at 29,16 : Two_lane_normal_road(none_line) 10176
dx:1, dy:0
Debug > connect() at (0, 0): before: 9 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 14 / 3
dx:-1, dy:0
Debug > connect() at (0, 0): before: 0 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 9 / 7
into build connect type at 30,16
use tiles: 1,1
oc:30,16
break at 30,16
call deleteObject: 30, 16
Debug > delete object at 30, 16 of 0, 0
delete object at 30, 16 of 0, 0
build at 30,16 : Two_lane_normal_road(none_line) 10177
dx:1, dy:0
Debug > connect() at (0, 0): before: 9 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 14 / 3
dx:-1, dy:0
Debug > connect() at (0, 0): before: 0 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 9 / 7
into build connect type at 30,17
use tiles: 1,1
oc:30,17
break at 30,17
call deleteObject: 30, 17
Debug > delete object at 30, 17 of 0, 0
delete object at 30, 17 of 0, 0
build at 30,17 : Two_lane_normal_road(none_line) 10178
dx:0, dy:1
Debug > connect() at (0, 0): before: 9 after: 2
Debug > addDirectionID(): South
Debug > connect(): set roadtypeconect 11 / 4
dx:0, dy:-1
Debug > connect() at (0, 0): before: 0 after: 1
Debug > addDirectionID(): North
Debug > connect(): set roadtypeconect 1 / 7
into build connect type at 30,18
use tiles: 1,1
oc:30,18
break at 30,18
call deleteObject: 30, 18
Debug > delete object at 30, 18 of 0, 0
delete object at 30, 18 of 0, 0
build at 30,18 : Two_lane_normal_road(none_line) 10179
dx:0, dy:1
Debug > connect() at (0, 0): before: 1 after: 2
Debug > addDirectionID(): South
Debug > connect(): set roadtypeconect 3 / 3
dx:0, dy:-1
Debug > connect() at (0, 0): before: 0 after: 1
Debug > addDirectionID(): North
Debug > connect(): set roadtypeconect 1 / 7
into build connect type at 29,18
use tiles: 1,1
oc:29,18
break at 29,18
call deleteObject: 29, 18
Debug > delete object at 29, 18 of 0, 0
delete object at 29, 18 of 0, 0
build at 29,18 : Two_lane_normal_road(none_line) 10180
dx:-1, dy:0
Debug > connect() at (0, 0): before: 1 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 10 / 4
dx:1, dy:0
Debug > connect() at (0, 0): before: 0 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 5 / 7
into build connect type at 28,18
use tiles: 1,1
oc:28,18
break at 28,18
call deleteObject: 28, 18
Debug > delete object at 28, 18 of 0, 0
delete object at 28, 18 of 0, 0
build at 28,18 : Two_lane_normal_road(none_line) 10181
dx:-1, dy:0
Debug > connect() at (0, 0): before: 5 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 14 / 3
dx:1, dy:0
Debug > connect() at (0, 0): before: 0 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 5 / 7
into build connect type at 27,18
update connection type at 27,18
type id: 7
dx:-1, dy:0
Debug > connect() at (0, 0): before: 5 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 14 / 3
dx:1, dy:0
Debug > connect() at (0, 0): before: 1 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 6 / 4
into build connect type at 27,17
update connection type at 27,17
type id: 3
dx:0, dy:-1
Debug > connect() at (0, 0): before: 6 after: 1
Debug > addDirectionID(): North
Debug > connect(): set roadtypeconect 7 / 4
dx:0, dy:1
Debug > connect() at (0, 0): before: 3 after: 2
Debug > addDirectionID(): South
Debug > connect(): set roadtypeconect 5 / 7
into build connect type at 27,17
update connection type at 27,17
type id: 7
into build connect type at 27,16
update connection type at 27,16
type id: 4
dx:0, dy:-1
Debug > connect() at (0, 0): before: 5 after: 1
Debug > addDirectionID(): North
Debug > connect(): set roadtypeconect 6 / 4
dx:0, dy:1
Debug > connect() at (0, 0): before: 7 after: 2
Debug > addDirectionID(): South
Debug > connect(): set roadtypeconect 9 / 7
into build connect type at 28,16
update connection type at 28,16
type id: 3
dx:1, dy:0
Debug > connect() at (0, 0): before: 9 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 14 / 3
dx:-1, dy:0
Debug > connect() at (0, 0): before: 14 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 23 / 0
into build connect type at 29,17
use tiles: 1,1
oc:29,17
break at 29,17
call deleteObject: 29, 17
Debug > delete object at 29, 17 of 0, 0
delete object at 29, 17 of 0, 0
build at 29,17 : Two_lane_normal_road(none_line) 10182
dx:1, dy:1
Debug > connect() at (0, 0): before: 23 after: -1
Debug > connect() at (0, 0): Direction disabled
dx:-1, dy:-1
Debug > connect() at (0, 0): before: 0 after: -1
Debug > connect() at (0, 0): Direction disabled
put grass: 26
put grass: 26
into build connect type at 30,17
update connection type at 30,17
type id: 3
into build connect type at 30,18
update connection type at 30,18
type id: 4
into build connect type at 29,18
update connection type at 29,18
type id: 3
dx:-1, dy:0
Debug > connect() at (0, 0): before: 10 after: 9
Debug > addDirectionID(): West
Debug > connect(): set roadtypeconect 19 / 0
dx:1, dy:0
Debug > connect() at (0, 0): before: 14 after: 5
Debug > addDirectionID(): East
Debug > connect(): set roadtypeconect 19 / 0

@yotiosoft
Copy link
Owner Author

UnitaryTools::getDirectionIDfromDifference():
更新前の値を見て、更新が必要な要素だけ加算・減算することが必要

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant